I have the following form
ethnicGroup: AbstractControl;
form: FormGroup;
type: AbstractControl;
constructor(
private _fb: FormBuilder) {
this.form = this._fb.group(
{
'type': [ '', ],
'ethnicGroup': [ '', ]
} );
this.type = this.form.controls[ 'type' ];
this.ethnicGroup = this.form.controls[ 'ethnicGroup' ]
}
Is there a way to check if a form has a required field on one of its control?
Thanks
You can check this by printing the form object in your console.