Is there a way to achieve conditional ng-pattern in angularjs
ng-pattern="(myForm.exipration.$dirty ? ('/^\d{2}[/]\d{4}$/') : '')"
i tried like above, but does not help.
Is there a way to achieve conditional ng-pattern in angularjs
ng-pattern="(myForm.exipration.$dirty ? ('/^\d{2}[/]\d{4}$/') : '')"
i tried like above, but does not help.
Markup
Controller
From https://stackoverflow.com/a/18984874/4640499.
The following worked for me (AngularJS v1.5.11):