<html> <head> <script type="text/javascript"> $(document).ready(function () { $('#loginForm').bootstrapValidator({ framework: 'bootstrap', excluded: [':disabled'], icon: { valid: 'glyphicon glyphicon-ok', invalid: 'glyphicon glyphicon-remove', validating: 'glyphicon glyphicon-refresh' }, //err: { // // You can set it to popover // // The message then will be shown in Bootstrap popover // container: 'tooltip' //}, fields: { username: { validators: { notEmpty: { message: 'The username is required' } } }, password: { validators: { notEmpty: { message: 'The password is required' } //}, //regexp: { // regexp: /^[a-z\s]+$/i, // message: 'The Password can consist of alphabetical characters only.' //} //regexp: { // regexp: /^[a-z\s]+$/i, // message: 'The full name can consist of alphabetical characters and spaces only' // } } } } }) .on('success.field.fv', function (e, data) { if (data.fv.getInvalidFields().length = 0) { // There is invalid field data.fv.disableSubmitButtons(true); } }); }); </script> </head> <body> <h2>Login</h2> <div class="container" style=""> <form id="loginForm" novalidate ng-submit="loginform.$valid && login.submit()" method="post" class="form-horizontal" data-ng-controller="IMSController"> <div class="form-group"> <label class="col-xs-3 control-label">Username</label> <div class="col-xs-5"> <input type="text" class="form-control" name="username" data-ng-model="LoginUserName" novalidate /> </div> </div> <div class="form-group"> <label class="col-xs-3 control-label">Password</label> <div class="col-xs-5"> <input type="password" class="form-control" name="password" data-ng-model="LoginPassword" novalidate /> </div> </div> <div class="checkbox" style="margin-removed 292px"> <label><input type="checkbox" data-ng-model="RememberMe"> Remember me</label> </div> <br /> <div class="form-group"> <div class="col-xs-5 col-xs-offset-3"> <button type="submit" class="btn btn-primary" ng-click="checkLogin()">Login</button> <button type="reset" class="btn btn-default">Reset</button> </div> </div> </form> </div> </body> </html>
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)