My code:
<div class='span3' ng-repeat="intFilter in intFilters"
ng-class="{ 'has-error' : filter.{{intFilter.name}}.$invalid &&
!filter.{{intFilter.name}}.$pristine }">
<label>{{intFilter.name}}</label>
<select class="metricFilter" ng-init="intFilter.selectedOp=operators[0]"
ng-model="intFilter.selectedOp" ng-options='op for op in operators' >
</select>
<input name="{{intFilter.name}}" id="{{intFilter.name}}"
class='inputFilter' ng-model='intFilter.input'
placeholder="integer value" ng-pattern="onlyNumbers">
<p style="color:red; font-size:11px;"
ng-show="filter.{{intFilter.name}}.$error.pattern" class="help-block">
{{intFilter.name}} is invalid!
</p>
</div>
... where you can assume that {{intFilter.name}} outputs Borehole Depth.
Validation error messages are displaying from the page load itself. The space character between Borehole and Depth is giving error for me I think.
Is this is the right approach?