我有以下表格
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' ]
}
有没有办法检查表单是否在其控件之一上有必填字段?
谢谢