You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flex.apache.org by "Mara Cou (JIRA)" <ji...@apache.org> on 2014/06/18 17:12:25 UTC
[jira] [Created] (FLEX-34378) mx:DateValidator allows multiple
separator chars
Mara Cou created FLEX-34378:
-------------------------------
Summary: 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
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)