Last active
August 29, 2015 13:57
-
-
Save maltzsama/9789821 to your computer and use it in GitHub Desktop.
Validação usando angulares
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <div class="large-12 columns"> | |
| <label>Username</label> | |
| <input type="text" | |
| placeholder="Desired username" | |
| name="username" <!-- sá porra aqui tem que tá no teu controller como $scope.username --> | |
| ng-model="signup.username" | |
| ng-minlength=3 | |
| ng-maxlength=20 | |
| ensure-unique="username" required /> | |
| <div class="error-container" ng-show="signup_form.username.$dirty && signup_form.username.$invalid"> | |
| <small class="error" ng-show="signup_form.username.$error.required">Please input a username</small> | |
| <small class="error" ng-show="signup_form.username.$error.minlength">Your username is required to be at least 3 characters</small> | |
| <small class="error" ng-show="signup_form.username.$error.maxlength">Your username cannot be longer than 20 characters</small> | |
| <small class="error" ng-show="signup_form.username.$error.unique">That username is taken, please try another</small> | |
| </div> | |
| </div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment