In AngularJS $invalid, $valid and $error property is used to validate form fields (input, textarea and select) client-side. Find AngulaJS ng-form Properties like $valid, $invalid, $dirty, $error from below list.
Syntax
Property | Description |
---|---|
$valid | It is used to check inputs are valid or not. |
$invalid | It is used to check inputs are invalid or not. |
$pristine | It is used to check inputs are unmodified by the user or not. |
$dirty | It is used to check inputs are modified by the user or not. Its just revers of pristine. |
$error | This contains collection of invalid control's input, if a validation fail it return true, otherwise false. |