Created
June 19, 2019 06:14
-
-
Save zenius/1e5b73c833ecdcc4ec783275633819a1 to your computer and use it in GitHub Desktop.
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
<form name="myForm"> | |
<label> | |
User name: | |
<input type="text" name="userName" ng-model="user.name" required> | |
</label> | |
<span class="error" ng-show="myForm.userName.$error.required"> Required!</span> | |
<label> | |
Last name: | |
<input type="text" name="lastName" ng-model="user.last" ng-minlength="3" ng-maxlength="10"> | |
</label> | |
<span class="error" ng-show="myForm.lastName.$error.minlength">Too short!</span> | |
<span class="error" ng-show="myForm.lastName.$error.maxlength">Too long!</span> | |
</form> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment