I have implemented some conditions to display my revision field. This involves accepting a number and setting it as a required field, so I have included validation checks for this purpose. Additionally, I have excluded this field from the 'edit' view by specifying the condition accordingly.
ng-show="editMode=='addNew' || editMode=='addDate'"
Despite the fact that the field is not visible in the edit view, the $invalid status seems to be true across all views.
<div class="form-group" ng-show="editMode=='addNew' || editMode=='addDate'">
<label for="editmyRevision" ng-class="{'col-sm-3':editMode=='addNew'}" class="col-md-2 control-label">Revision</label>
<div ng-class="{'col-sm-9':editMode=='addNew'}" class="col-md-10">
<input class="form-control" ng-model="editmyRevision"name="revision" ng-required="editMode=='addNew' || editMode =='addDate'" ng-maxlength="5" ng-Pattern="/^[0-9]*$/"></input>
<span class="has-error help-block" data-ng-show="prodEdit.revision.$invalid">Acceptable formats: 100~99999</span>
</div>
</div>
What could possibly be the issue here?