I have a form that uses FormGroup.
I want to add validator to some controls that contain data (after user has entered data and clicked on 'check' button.)
I tried this:
this.fg.controls['someKey'].setValidators([Validators.required]);
and
this.fg.controls['someKey'].updateValueAndValidity();
but it clears the data from the control.
Any idea?