flex-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Justin Mclean (JIRA)" <j...@apache.org>
Subject [jira] [Issue Comment Deleted] (FLEX-20461) CurrencyValidator does NOT validate minValue and maxValue if decimalSeparator is not .
Date Tue, 30 Apr 2013 05:56:15 GMT

     [ https://issues.apache.org/jira/browse/FLEX-20461?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Justin Mclean updated FLEX-20461:
---------------------------------

    Comment: was deleted

(was: Code should have maxValue as 300. Make this change are code correctly validates "300,00")
    
> CurrencyValidator does NOT validate minValue and maxValue if decimalSeparator is not
.
> --------------------------------------------------------------------------------------
>
>                 Key: FLEX-20461
>                 URL: https://issues.apache.org/jira/browse/FLEX-20461
>             Project: Apache Flex
>          Issue Type: Bug
>          Components: Validators
>    Affects Versions: Adobe Flex SDK 3.2 (Release)
>         Environment: Affected OS(s): All OS Platforms
> Browser: Firefox 3.x
> Language Found: English
>            Reporter: Adobe JIRA
>
> Steps to reproduce:
> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
> 	<mx:HBox>
> 		<mx:TextInput id="input" text="300,00"/>
> 		<mx:Button id="but" label="validate"/>
> 	</mx:HBox>
> 	<mx:CurrencyValidator source="{input}" property="text" minValue="0" maxValue="200"
decimalSeparator="," thousandsSeparator="."
> 		trigger="{but}" triggerEvent="click"/>
> </mx:Application>
>  
>  Actual Results: Text default input is validated.
>  
>  Expected Results:  Text input should be invalid, as 300 > 200
>  
>  
>  Workaround (if any): 
> Can be fixed by adding the following lines in mx.validators.CurrencyValidator, at line
342:
> 	            if (decimalSeparator != '.') {
> 					input = input.replace(decimalSeparator, '.');
> 	            }
>  
> I don't have yet an account to submit a patch, so I've subclassed the CurrencyValidator
to include the code above.
> By looking at the source code, the NumberValidator has the same bug.

--
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

Mime
View raw message