Created
April 4, 2017 06:46
-
-
Save natenault/768242d0a49ebd49a3bdf98e6cefadcd to your computer and use it in GitHub Desktop.
This file contains 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="container" ng-app="demoApp"> | |
<form name="messageForm" novalidate> | |
<!-- NAME --> | |
<label for="name">Name</label> | |
<input type="text" name="name" id="name" placeholder="Name" ng-model="formData.name" required> | |
<div ng-messages="messageForm.name.$error" ng-show="messageForm.name.$touched"> | |
<div ng-message="required">This field is required</div> | |
</div> | |
<!-- EMAIL --> | |
<label for="email">Email</label> | |
<input type="email" name="email" id="email" placeholder="Email address" ng-model="formData.email" required> | |
<div ng-messages="messageForm.email.$error" ng-show="messageForm.email.$touched"> | |
<div ng-message="required">This needs to be a valid email</div> | |
</div> | |
<!-- MESSAGE CONTENT --> | |
<label for="message">Message</label> | |
<textarea name="message" rows="6" id="message" placeholder="Message..." ng-model="formData.message" ng-maxlength="400" required></textarea> | |
<div ng-messages="messageForm.message.$error" ng-show="messageForm.email.$touched"> | |
<div ng-message="maxlength">This field is too long</div> | |
</div> | |
<!-- FORM ACTIONS --> | |
<button type="submit" ng-disabled="messageForm.$invalid">SEND</button> | |
</form> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment