I would like to start the validation of the fields of my forms only when the user leave the field (onblur
).
I\'m trying in this way:
Set params as AbstractControlOptions
firstName: ['initial value',{
validators: [Validators.required, Validators.minLength(2), forbiddenNameValidator(/bob/i)],
asyncValidators: [forbiddenNameValidatorAsync()],
updateOn: 'blur'
}],
Example here https://stackblitz.com/edit/angular-hdna17?file=src%2Fapp%2Fhello.component.ts