It's a nice plugin and i'm going to use it but my only problem with it
is that you can't set the highest number for example i want to use it
to guided users to fill in a date so it would be great to be able to
use "31-12-9999" but that will be difficult because i saw it validates
each character seperate.
i changed it a bit
switch(mask.charAt(pos)){
case '9': return "[0-9]";
case'a': return "[A-Za-z]";
case '*': return "[A-Za-z0-9]";
default: return null;
}
to
switch(mask.charAt(pos)){
case '1': return "[0-1]";
case '2': return "[0-2]";
case '3': return "[0-3]";
case '4': return "[0-4]";
case '5': return "[0-5]";
case '6': return "[0-6]";
case '7': return "[0-7]";
case '8': return "[0-8]";
case '9': return "[0-9]";
case'a': return "[A-Za-z]";
case '*': return "[A-Za-z0-9]";
default: return null;
}
and
if(mask.charAt(i)!='9' && mask.charAt(i)!='a' && mask.charAt(i)!='*')
{
to
if(mask.charAt(i)!='1' && mask.charAt(i)!='2' && mask.charAt(i)!='3'
&& mask.charAt(i)!='4' && mask.charAt(i)!='5' &&
mask.charAt(i)!='6' && mask.charAt(i)!='7' &&
mask.charAt(i)!='8' && mask.charAt(i)!='9'
&& mask.charAt(i)!='a' && mask.charAt(i)!='*'){
It adds a lot of code but now i can use "39-19-9999". It's also not
really what i want but it does the job for now.