I have a custom async validator, and I want to set updateOn: 'blur'
property using FormBuilder
:
myForm = this.formBuilder.group({
email: ['', [Validators.required], [this.myAsyncValidator]]
// ...
});
I tried this but it does not work:
email: ['', [Validators.required], [this.myAsyncValidator, {updateOn: 'blur'}]]
Note
I DO NOT want to create form control instances manually like the following:
myForm = new FormGroup({
email: new FormControl('', {asyncValidators: [this.myAsyncValidator]}, updateOn: 'blur')
});