0

我有以下表格

  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' ]
  }

有没有办法检查表单是否在其控件之一上有必填字段?

谢谢

4

1 回答 1

0

您可以通过在控制台中打印表单对象来检查这一点。

于 2017-01-30T11:34:49.560 回答