, ($ 0.00 - $10000.00), , .
, $.mask.definitions['symbol'] = '???' , API mask :
$.each(mask.split(""), function (i, c) {
if (c == '?') {
len--;
partialPosition = i;
} else if (defs[c]) {
tests.push(new RegExp(defs[c]));
if (firstNonMaskPos == null)
firstNonMaskPos = tests.length - 1;
} else {
tests.push(null);
}
});
... On the other hand, the definition of the mask []|[0-9]does not work (I'm trying to make an empty string or 0-9 for those who are not literate in regex.) For reference, I'm trying to create to fulfill the condition 0.00-10000.00, for example oooo9.99, where ois equal []|[0-9].
Since the code confirms that it is based on regular expressions, a zero or range pattern should work, but it is not; this is a more obscure mask error. If only I try to do something wrong, which is also possible ...
source
share