string-mask icon indicating copy to clipboard operation
string-mask copied to clipboard

Validation backwards

Open jacox02 opened this issue 3 years ago • 1 comments

Hi, first of all idk a lot of english but i'll do my best.

Well the thing is, Im using the validate method to validate mask on ID input, Im using the next mask: let mask = new StringMask("000-0000000-0"); When I send 11111111111 for example, the validate method returns true, otherwise when I send a string formated 111-1111111-1 it returns false...

jacox02 avatar Jul 09 '21 17:07 jacox02

try cleaning the string first (remove the -) with a regex

tropikoder avatar Oct 13 '22 17:10 tropikoder