Skip to content

Instantly share code, notes, and snippets.

@petebacondarwin
Last active August 29, 2015 14:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save petebacondarwin/11264789 to your computer and use it in GitHub Desktop.
Save petebacondarwin/11264789 to your computer and use it in GitHub Desktop.
<form ng-message-include="form-messages">
<input class="form-control" type="text" name="first_name" id="input_first_name" ng-model="data.first_name" required />
<div class="error-messages" ng-if="interacted(my_form.first_name)" ng-message="my_form.first_name.$error">
<div ng-message-on="required">You did not enter your first name</div>
</div>
<input class="form-control" type="text" name="last_name" id="input_last_name" ng-model="data.last_name" required />
<div class="error-messages" ng-if="interacted(my_form.last_name)" ng-message="my_form.last_name.$error">
<div ng-message-on="required">You did not enter your last name</div>
</div>
</form>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment