flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jmcl...@apache.org
Subject git commit: [flex-sdk] - 'Fixed' mustella test - some of teh existing text may be looking for and the SDK provides the wrong validation error
Date Sat, 27 Apr 2013 23:33:50 GMT
Updated Branches:
  refs/heads/develop d7c12ee5a -> 109f8b13c


'Fixed' mustella test - some of teh existing text may be looking for and the SDK provides
the wrong validation error


Project: http://git-wip-us.apache.org/repos/asf/flex-sdk/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-sdk/commit/109f8b13
Tree: http://git-wip-us.apache.org/repos/asf/flex-sdk/tree/109f8b13
Diff: http://git-wip-us.apache.org/repos/asf/flex-sdk/diff/109f8b13

Branch: refs/heads/develop
Commit: 109f8b13c450e946159b9b1fcb8744afd5a44778
Parents: d7c12ee
Author: Justin Mclean <jmclean@apache.org>
Authored: Sun Apr 28 09:33:03 2013 +1000
Committer: Justin Mclean <jmclean@apache.org>
Committed: Sun Apr 28 09:33:03 2013 +1000

----------------------------------------------------------------------
 .../framework/src/mx/validators/DateValidator.as   |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/109f8b13/frameworks/projects/framework/src/mx/validators/DateValidator.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/framework/src/mx/validators/DateValidator.as b/frameworks/projects/framework/src/mx/validators/DateValidator.as
index 80ac323..ac50338 100644
--- a/frameworks/projects/framework/src/mx/validators/DateValidator.as
+++ b/frameworks/projects/framework/src/mx/validators/DateValidator.as
@@ -326,18 +326,18 @@ public class DateValidator extends Validator
 						&& (lastStringChar != "");
 					var curentIsDigit:Boolean = (DECIMAL_DIGITS.indexOf(stringChar) >= 0);
 					
-					if (lastIsDigit != curentIsDigit)
-					{
-						part++;
-						dateParts[part] = stringChar;
-					}
-					else if (validInput.indexOf(stringChar) == -1)
+					if (validInput.indexOf(stringChar) == -1)
 					{
 						results.push(new ValidationResult(
 							true, baseField, "invalidChar", 
 							validator.invalidCharError));
 						return results;
 					}
+					else if (lastIsDigit != curentIsDigit)
+					{
+						part++;
+						dateParts[part] = stringChar;
+					}
 					else
 					{
 						dateParts[part] += stringChar;


Mime
View raw message