Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!doctype html>
- <html lang="en" ng-app="far_login">
- <head>
- <meta charset="utf-8">
- <title>Angular test</title>
- <script src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.5.0/angular.min.js"></script>
- </head>
- <body>
- <div ng-controller="far_formcontrol">
- <form name = "sform" novalidate="true">
- <table border="0">
- <tr>
- <td>
- First name:
- </td>
- <td>
- <input type="text" name="fname" ng-model="fname" placeholder="First Name" required="true" ng-pattern="/^[A-Za-z]*$/">
- </td>
- <td ng-show="sform.fname.$invalid && !sform.fname.$pristine" class="help-block">wrong name </td>
- </tr>
- <tr>
- <td>
- Last Name:
- </td>
- <td>
- <input type="text" ng-model="lname" placeholder="last Name" required="true" ng-pattern="/^[A-Za-z]*$/">
- </td>
- <td ng-show= "sform.lname.$invalid && !sform.lname.$pristine" class="help-block">wrong Last name </td>
- </tr>
- <tr>
- <td>
- Email:
- </td>
- <td>
- <input type="email" ng-model="email" placeholder="email" required="true">
- </td>
- <td ng-show="sform.email.$invalid && !sform.email.$pristine" class="help-block">wrong Email </td>
- </tr>
- <tr>
- <td>
- <button type="submit" ng-disabled="sform.$invalid" ng-click = "submitForm()">Submit</button>
- </td>
- </tr>
- </table>
- </form>
- </div>
- <script src="far_app.js"></script>
- </body>
- </html>
Add Comment
Please, Sign In to add comment