Bottom line: You can use all HTML5 form validation features, while angular also enhances partial validation to support dynamic validation
1. On the source code
1 <DivNg-controller= "Examplecontroller">2 <formAction=""name= "Exampleform">3 <label>Name (Required ng-minlength=1 ng-maxlength=3):</label> <inputtype= "text"name= "Name"Ng-model= "User.Name"Required Ng-minlength=1Ng-maxlength=3> <BR>4 <label>English name (ng-pattern= "/[a-za-z]/"):</label> <inputtype= "text"name= "Englishname"Ng-model= "User.englishname"Ng-pattern= "/[a-za-z]/"> <BR>5 <label>Age (number):</label> <inputtype= "Number"name= "Age"Ng-model= "User.age"Required> <BR>6 <label>Email (email):</label> <inputtype= "Email"name= "Email"Ng-model= "User.email" /> <BR>7 <label>Blog address (URL):</label> <inputtype= "url"name= "Homepage"Ng-model= "User.homepage" /> <BR>8 9 <inputtype= "Submit"value= "Submit" />Ten </form> One A <Script> - varmyApp=Angular.module ('myApp', []); - Myapp.controller ('Examplecontroller', function($scope) { the $scope. Global= {}; - $scope. Global.fdate= NewDate (); - - $scope. iscapitalized= function(str) { + returnstr[0] ==str[0].touppercase (); - }; + A }); at </Script> - </Div>
2. View the results of the operation online
Http://jimuyouyou.github.io/angular-bootstrap-rest-seed/examples/angular/5-form-validation.html
3. Project Address
Github:https://github.com/jimuyouyou/angular-bootstrap-rest-seed
Simple words angular angular form verification