$setValidity(validationErrorKey, isValid);
Change the validity state, and notify the form.
This method can be called within $parsers/$formatters or a custom validation implementation. However, in most cases it should be sufficient to use the ngModel.$validators and ngModel.$asyncValidators collections which will call $setValidity automatically.
Parameters
| Param | Type | Details |
|---|---|---|
| validationErrorKey | string | Name of the validator. The |
| isValid | boolean | Whether the current state is valid (true), invalid (false), pending (undefined), or skipped (null). Pending is used for unfulfilled |
Please login to continue.