Say I have an input that specifies a pre existing validator
ng-pattern="stringValidator"
and I want to extend or customize this pattern without creating a whole new pattern, is there way to do that inline? In other words can I enter the validation regex directly into the tag declaration or something similiar that?
Current Tag Declaration:
The "stringValidator" pattern, which is defined externally to this code domain, impliments an undesirable rule which I need to override. I can not edit "stringValidator", nor can I add a custom rule to the same code file as "stringValidator".
<input type="text" id="txt-foo" placeholder="" name=""
class="form-control"
ng-model="txtName" ng-maxlength="255"
ng-pattern="stringValidator"
autocomplete="off" />
I would like to do something like this:
<input type="text" id="txt-foo" placeholder="" name=""
class="form-control"
ng-model="txtName" ng-maxlength="255"
ng-pattern="/^[^%\[\]<>"%;&()]+$/"
autocomplete="off" />
Thanks.