D3
OG
Old school D3 from simpler times
All examples
By author
By category
About
bvsbharat
Full window
Github gist
AngularJS Form Validation
<div ng-app="validationApp" ng-controller="mainController"> <div class="container"> <div class="row"> <div class="col-sm-6"> <!-- FORM ============ --> <form name="userForm" ng-submit="submitForm()" novalidate> <!-- USERNAME --> <div ng-form="forminside" ng-repeat =" item in passengerCount"> <div class="form-group" ng-class="{ 'has-error' : item.token.username.$invalid && !item.token.username.$pristine }"> <label>Username</label> <input type="text" name="username" class="form-control" ng-model="item.token.username" ng-minlength="3" ng-maxlength="8"> <p ng-show="item.token.username.$error.minlength" class="help-block">Username is too short.</p> <p ng-show="item.token.username.$error.maxlength" class="help-block">Username is too long.</p> </div> </div> <button type="submit" class="btn btn-primary" ng-disabled="userForm.forminside.$invalid">Submit</button> </form> </div> </div> </div> </div>