2017-04-25 6 views

Antwort

4
//Try this, not verified, but should work 

this.formGroup.controls["firstName"].setValidators(Validators.required); 

Für mehrere Validierer

this.formGroup.controls["firstName"].setValidators([Validators.required, Validators.minLength(2)]); 

Aber so alle Validatoren wird außer Kraft gesetzt zu tun, die auch während initialistaion

+0

seine Arbeit zur Verfügung gestellt werden !!! Vielen Dank :) – haya

Verwandte Themen