Change the validity state, and notifies the form when the control changes validity. (i.e. it does not notify form if given validator is already marked as invalid).
This method should be called by validators - i.e. the parser or formatter functions.
validationErrorKey – {string} –
Name of the validator. the validationErrorKey
will assign
to $error[validationErrorKey]=isValid
so that it is available for data-binding.
The validationErrorKey
should be in camelCase and will get converted into dash-case
for class name. Example: myError
will result in ng-valid-my-error
and ng-invalid-my-error
class and can be bound to as {{someForm.someControl.$error.myError}}
.
isValid – {boolean} –
Whether the current state is valid (true) or invalid (false).
Read a value from view.
This method should be called from within a DOM event handler.
For example input
or
select
directives call it.
It internally calls all formatters
and if resulted value is valid, updates the model and
calls all registered change listeners.
value – {string} –
Value from the view.
Actual string value in the view.
The value in the model, that the control is bound to.
Whenever the control reads value from the DOM, it executes all of these functions to sanitize / convert the value as well as validate.
Whenever the model value changes, it executes all of these functions to convert the value as well as validate.
An bject hash with all errors as keys.
True if user has not interacted with the control yet.
True if user has already interacted with the control.
True if there is no error.
True if at least one error on the control.