string-mask
string-mask copied to clipboard
Validation backwards
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...
try cleaning the string first (remove the -) with a regex