I have an input that should validate only if input length is 11 or 14. Is there any way of achieve this without create a directive?
There's one more thing:
I'm using a mask that formats the input as this:
(when 11)
000.000.000-00
(when 14)
00.000.000/0000-00
the pattern should ignore '.' and '/'
Thanks.
Try use
ng-pattern