You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flex.apache.org by "Dylan Randall (JIRA)" <ji...@apache.org> on 2013/10/08 13:06:41 UTC
[jira] [Created] (FLEX-33807) DateValidator class
(mx.validators.DateValidator) incorrectly validating date
Dylan Randall created FLEX-33807:
------------------------------------
Summary: DateValidator class (mx.validators.DateValidator) incorrectly validating date
Key: FLEX-33807
URL: https://issues.apache.org/jira/browse/FLEX-33807
Project: Apache Flex
Issue Type: Bug
Affects Versions: Apache Flex 4.10.0
Environment: Windows 7 64bit Professional (SP1) running on MacBook Pro Mid 2010 with OSX 10.8.5 Bootcamp.
FlashBuilder 4.7 Standard
Apache Flex 4.10
AIR 3.8
Flash Player 11.8
Reporter: Dylan Randall
Fix For: Apache Flex 4.9.0
The DateValidator class keeps returning an error on validation although the date being validated is correct according to the format provided.
The date I am using is 19530621
Here is the code snippet
var strDate:String = "19530621";
var result: String = null;
var resultArray: Array = null;
var validator:DateValidator = new DateValidator();
validator.inputFormat="YYYYMMDD";
resultArray = DateValidator.validateDate(validator, strDate, "");
if (resultArray.length == 0)
result = ""; // no problems
else
{
var vr: ValidationResult = resultArray[0] as ValidationResult;
result = vr.errorMessage;
}
The error returned in the result array at position 0 is below
errorCode "wrongLength"
errorMessage "Type the date in the format. YYYYMMDD"
isError true
subField ""
The same code works as it should (passing validation) on SDK 4.9.
I have tried a number of different dates some incorrect and others correct but the same error is returned everytime.
I hope this is enough information to fix this bug.
Thanks
--
This message was sent by Atlassian JIRA
(v6.1#6144)