2

I want the ng-pattern value to change based on a condition like :

<input class="form-control" type="text" ng-model="emialid" ng-pattern="<codition> ? <regex1> : <regex2>" name="email" required></input>
eko
  • 39,722
  • 10
  • 72
  • 98
  • Possible duplicate of https://stackoverflow.com/questions/38587499/how-to-apply-multiple-ng-pattern-with-or-condition-in-input-box –  Aug 03 '17 at 07:25
  • 3
    Possible duplicate of [How to apply Multiple ng-pattern with or condition in input box](https://stackoverflow.com/questions/38587499/how-to-apply-multiple-ng-pattern-with-or-condition-in-input-box) – byteC0de Aug 03 '17 at 07:29
  • @slacker - This is not a duplicate question as i want the ng-pattern to take one value on the basis of a condition while the above questions you told, just give an OR in the regex irrespective of any condition. – Raj Rajeshwar Singh Rathore Aug 03 '17 at 11:41

0 Answers0