I am trying to do validation using the
and
. This works fine when user tabs out of the input without filling. B
You can also easily call the AbstractControl.updateValueAndValidity()
function on button click. This will run the validation process on the corresponding ForControl again and show errors, if there are some (based on your Validators).
So, in your example:
checkForErrorsOnButtonClick(): void {
dueDateValidator.updateValueAndValidity();
}