I have created custom text component for textbox and i am trying to validate by reactive form validation but not working.
Getting Error:
ERROR Error: formControlName must be used with a parent formGroup directive. You'll want to add a formGroup directive and pass it an existing FormGroup instance (you can create one in your class).
Anyone can help to resolve this issue?
https://stackblitz.com/edit/angular-6-reactive-form-validation-9pu6hq?file=app%2Fapp.component.html
app.component.html:
<app-textbox formControlName="password"></app-textbox>
app.component.ts:
this.registerForm = this.formBuilder.group({
firstName: ['', Validators.required],
password: ['', [Validators.required, Validators.minLength(6)]]
});