[ https://issues.apache.org/jira/browse/FLEX-14450?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Justin Mclean updated FLEX-14450: --------------------------------- Labels: easyfix easytest (was: ) > NumberValidator maxValue/minValue don't work with non-english settings > ---------------------------------------------------------------------- > > Key: FLEX-14450 > URL: https://issues.apache.org/jira/browse/FLEX-14450 > Project: Apache Flex > Issue Type: Bug > Components: Validators > Affects Versions: Adobe Flex SDK 3.0 (Release) > Environment: Affected OS(s): Windows > Affected OS(s): Windows XP > Browser: Internet Explorer 6.x > Language Found: English > Reporter: Adobe JIRA > Priority: Minor > Labels: easyfix, easytest > > Steps to reproduce: > 1. Paste this code in an MXML application: > <mx:TextInput id="fieldValue"/> > <mx:NumberValidator source="{fieldValue}" property="text" > minValue="500" maxValue="1000" > decimalSeparator="," thousandsSeparator="." /> > 2. Try to enter the values "300" and "1200", and verify that the validator > fails (correctly). > 3. Try to enter the values "300,00" and "1200,00", and verify that the > validator does not fail. > > Actual Results: > The invalid values are allowed. > > Expected Results: > NumberValidator should fail validating "300,00" and "1200,00" with the > decimalSeparator and the thousandsSeparator set like in the example. > > Workaround (if any): > Subclassing the NumberValidator and implementing correctly the check. > > The bug is at line 295 of NumberValidator.as: > var x:Number = Number(input); > This way, the input (which is a String, see line 1054 of the same source > file) get parsed using the dot as the decimal separator. Doing this on a > String like "300,00" or "1200,00" results in a NaN. Subsequent check will > then fail on this value. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira