I am using the below code for validating required, min length and max length, which is giving all three messages. Could you please tell how to control based on the user input.
<form name="Textvaluepair" novalidate>
<h4>New Network</h4>
<div class="form-group" ng-class="{ 'has-error': Textvaluepair.name.$touched && Textvaluepair.name.$invalid }">
<label>Name</label>
<input type="text" name="name" class="form-control"
ng-model="networkModel.name"
ng-minlength="5"
ng-maxlength="10"
required>
<div class="help-block" ng-messages="Textvaluepair.name.$error" ng-if="Textvaluepair.name.$touched">
<p ng-message="minlength">Your name is too short.</p>
<p ng-message="maxlength">Your name is too long.</p>
<p ng-message="required">Your name is required.</p>
</div>
</div>
<div class="form-group">
<button type="submit" ng-click="Submit()">Submit</button>
</div>
</form>
