name="myForm">
     User name: <input type="text" name="userName" ng-model="user.name" required>
     <span class="error" ng-show="myForm.userName.$error.required">
       Required!</span><br>
     Last name: <input type="text" name="lastName" ng-model="user.last"
       ng-minlength="3" ng-maxlength="10">
     <span class="error" ng-show="myForm.lastName.$error.minlength">
       Too short!</span>
     <span class="error" ng-show="myForm.lastName.$error.maxlength">
       Too long!</span><br>
   </form>
  