Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
4.1.1
-
None
Description
The bug is really in dojo.validate.isInRange(), but it can be worked around with a change in the validator call.
I have a custom validator that allows numeric values with comma separators. It uses dojo.validate.isInteger() with the separator parameter.
This should work with dojo.validate.isInRange(), but it has a bug:
value = value.replace(dojo.lang.has(flags,'separator')?flags.separator:',', '', 'g').
replace(dojo.lang.has(flags,'symbol')?flags.symbol:'$', '');
the default if flags does not have the separator property (which it won't from Min and Max) should be
/,/g
instead of ','. String.replace() doesn't take 3 parameters in IE 6, it takes 2, and the first one is a regular expression.
I can redefine this function for now, but I'd like to see the Tapestry validators allow for configuration of separators too.