$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 validationErrorKey will be assigned to either $error[validatio