Does anybody know whether there is a standard way in angular (2) of triggering form control validation onblur instead of onchange?
We use angular reactive forms. I can not find any configuration options for triggering validation onblur instead of onchange. Example:
this.loginForm = this.fb.group(
{
username: ['', [Validators.required]],
password: ['', [Validators.required]],
}
);
Here the required-validators are triggered on any value change in the attached input elements. Is there a way to trigger the validators only onblur (i.e. when leaving the input element)?
Any ideas are appreciated!
Remarks: In angularjs we used ng-model-options:
ng-model-options="{ updateOn: 'blur' }"