i am new on angular js, working on form validations. I have done all but still validation doesn't work. Here is my code:
<form role="form" name="studentForm" class="form-horizontal" novalidate>
<div class="form-group">
<label for="student_email" class="col-sm-2 control-label">Email</label>
<div class="col-sm-10">
<input type="email" name="student_email" ng-model="studentEmail" class="form-control" id="student_email" required>
<div role="alert" class="error-msg" ng-messages="studentForm.student_email.$error">
<p ng-message="required">Your email is required.</p>
</div>
</div>
</div>
</form>
Script:
angular.module('app', ['ngMessages']);