You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flex.apache.org by "Justin Mclean (JIRA)" <ji...@apache.org> on 2013/10/08 15:55:42 UTC

[jira] [Resolved] (FLEX-33807) DateValidator class (mx.validators.DateValidator) incorrectly validating date

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

Justin Mclean resolved FLEX-33807.
----------------------------------

       Resolution: Fixed
    Fix Version/s:     (was: Apache Flex 4.9.0)
                   Apache Flex 4.11.0

Checked into develop/release branch. DateValidator tests pass.

> 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
>            Assignee: Justin Mclean
>              Labels: patch
>             Fix For: Apache Flex 4.11.0
>
>   Original Estimate: 48h
>  Remaining Estimate: 48h
>
> 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)