FormValidator custom RegExp
Brought to you by:
ttm
Custom regexp in FormValidator does not work. The error is in jsval.js, near line 225.
Original code:
nBegin=0;nEnd=0;
if(regex.charAt(0)=="/")nBegin=1;
if(regex.charAt(regex.length-1)=="/")nEnd=0;
Modified code:
nBegin=0;nEnd=regex.length;
if(regex.charAt(nBegin)=="/")nBegin=+1;
if(regex.charAt(nEnd-1)=="/")nEnd=-1;
The syntax of the slice function at the next line was not correct for strings.
Regards