can i trigger a form validation when i submit it?

  1. Not set validator. Just let empty.
  2. When submit (what just button) and you can add validator runtime by setValidators() and setErrors() if you want.
  3. After there are/is error(s), you have to clean validators with empty array into setValidators()

https://angular.io/api/forms/AbstractControl#setValidators https://angular.io/api/forms/AbstractControl#setErrors

I recommend read more API options.

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top