Form validation through ANGULARJS requires setting the Novalidate property in the form
The Novalidate property is not required in the app, but you need to use it in the AngularJS form to override the standard HTML5 validation.
Before form validation and validation rules need to be set to form, and input to the Name property, in order to validate when the label gets to the validation
Validation rules: Both are Boolean
(Specific validation rules can be written with regular expressions in input Add Ng-pattern property)
$dirty: The form has been filled in records, whether modified
$valid: Fields that are filled in are legal and validated
$invalid: The entry is not legal, failed
$pristine: The form has no content and has not been modified
$submitted: Have you submitted
For example:
<form ng-app="myApp" ng-controller="Validatectrl"
Name="MyForm" novalidate>
<P> Email:
<InputType="Email"Name="Email"Ng-model="Email"Required>
<Spanstyle="Color:red"ng-show=>
<span ng-show= "Myform.email. $error. Required" > mailbox is required. </span>
<span ng-show= "Myform.email. $error. Email" Span class= "HIGHGT" >> illegal mailbox. </span>
</span>
</p< Span class= "highgt" >>
</FORM>
$error object: Generated when validation does not pass, contains all failed validation rules
$untouched boolean have never been clicked/touched
$touched boolean has lost focus
$pristine boolean has never been modified
$dirty Whether the boolean has been modified
$valid boolean If all validations are validated through
$invalid Boolean Verify that the
$name string The value of the table cell Name property
AngularJS Form Validation