You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by jm...@apache.org on 2013/05/15 03:34:55 UTC

git commit: [flex-sdk] [refs/heads/develop] - Changed so one one wrong length error is reported even if there is more than one.

Updated Branches:
  refs/heads/develop 8cc485db7 -> fd577f91b


Changed so one one wrong length error is reported even if there is more than one.


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

Branch: refs/heads/develop
Commit: fd577f91bee0518e22647791e7daca89043dac90
Parents: 8cc485d
Author: Justin Mclean <jm...@apache.org>
Authored: Wed May 15 11:33:16 2013 +1000
Committer: Justin Mclean <jm...@apache.org>
Committed: Wed May 15 11:33:16 2013 +1000

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


http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/fd577f91/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 7a6980b..b082502 100644
--- a/frameworks/projects/framework/src/mx/validators/DateValidator.as
+++ b/frameworks/projects/framework/src/mx/validators/DateValidator.as
@@ -387,6 +387,7 @@ public class DateValidator extends Validator
 						true, baseField, "wrongLength", 
 						validator.wrongLengthError
 						+ (DateValidator._includeFormatInError?" " + inputFormat:"")));	
+					return results;
 				}
 				// MM or M format
 				if ((monthRequired && monthPart.length == 2 && dateObj.month.length != 2)
@@ -395,7 +396,8 @@ public class DateValidator extends Validator
 					results.push(new ValidationResult(
 						true, baseField, "wrongLength", 
 						validator.wrongLengthError
-						+ (DateValidator._includeFormatInError?" " + inputFormat:"")));	
+						+ (DateValidator._includeFormatInError?" " + inputFormat:"")));
+					return results;
 				}
 				// YY or YYYY format
 				if ((yearRequired && yearPart.length == 2 && dateObj.year.length != 2)
@@ -405,6 +407,7 @@ public class DateValidator extends Validator
 						true, baseField, "wrongLength", 
 						validator.wrongLengthError
 						+ (DateValidator._includeFormatInError?" " + inputFormat:"")));	
+					return results;
 				}
 						
 				if ((monthRequired && dateObj.month == "") ||