What is the right approach for the below line?
ng-pattern="(true)? apply-pattern : dont-apply-pattern"
My Issue is, I'm hiding the ng-pattern
field when its not needed, but still its not allowing the form to be valid.
I tried the field to be disabled, but no luck.
The code is:
<input type="text" ng-hide="param.paramType == 'java.lang.boolean'"
ng-pattern="param.paramValidatePattern" class="form-control input-sm" name="paramV"
ng-model="param.paramValue" ng-required="param.paramType != 'java.lang.boolean'"
ng-disabled="param.paramType == 'java.lang.boolean'" />