flex-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Justin Mclean (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FLEX-34378) mx:DateValidator allows multiple separator chars
Date Sun, 06 Jul 2014 02:17:34 GMT

    [ https://issues.apache.org/jira/browse/FLEX-34378?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14053015#comment-14053015
] 

Justin Mclean commented on FLEX-34378:
--------------------------------------

Changed patch to match local formatting. DateValidator tests pass, checked into develop.

> mx:DateValidator allows multiple separator chars
> ------------------------------------------------
>
>                 Key: FLEX-34378
>                 URL: https://issues.apache.org/jira/browse/FLEX-34378
>             Project: Apache Flex
>          Issue Type: Bug
>          Components: Validators
>    Affects Versions: Apache Flex 4.12.0
>         Environment: WIN 7 64
> Flash 14
>            Reporter: Mara Cou
>            Priority: Minor
>              Labels: easyfix, easytest
>         Attachments: FLEX34378.patch
>
>
> With Adobe Flex 4.12, the following validator declaration reports no validation error
for input string "12/////12/////2012".
> With Apache Flex 4.6 this leads to a validation error, which is the correct behaviour.
> {code}
> <?xml version="1.0" encoding="utf-8"?>
> <s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009" 
> 					   xmlns:s="library://ns.adobe.com/flex/spark" 
> 					   xmlns:mx="library://ns.adobe.com/flex/mx">
> 	<fx:Script>
> 		<![CDATA[
> 			import mx.controls.Alert;
> 		]]>
> 	</fx:Script>
> 	
> 	<fx:Declarations>
> 		<mx:DateValidator
> 			source="{enteredDate}" 
> 			property="text" 
> 			inputFormat="mm/dd/yyyy"
> 			wrongLengthError="The date format is not correct"
> 			allowedFormatChars="/ - ."
> 			trigger="{checkDate}" 
> 			triggerEvent="click"
> 			valid="{Alert.show('Date is valid')}"
> 			invalid="{Alert.show('Date is invalid')}"/>
> 	</fx:Declarations>
> 	
> 	
> 	<mx:Text text="Enter date (mm/dd/yyyy or mm-dd-yyyy or mm dd yyyy):"/>
> 	<mx:TextInput y="150"
> 				  id="enteredDate" />
> 	<mx:Button y="75"
> 			   label="Check Date" id="checkDate"/>
> 	
> </s:WindowedApplication>
> {code}



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message