royale-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ha...@apache.org
Subject [royale-asjs] branch feature/validation updated: Fixed SS Validator
Date Sun, 01 Oct 2017 00:01:39 GMT
This is an automated email from the ASF dual-hosted git repository.

harbs pushed a commit to branch feature/validation
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git


The following commit(s) were added to refs/heads/feature/validation by this push:
     new c4f4e6b  Fixed SS Validator
c4f4e6b is described below

commit c4f4e6bf46b58129f4ca6949e0d434713d166c61
Author: Harbs <harbs@in-tools.com>
AuthorDate: Sun Oct 1 03:01:36 2017 +0300

    Fixed SS Validator
---
 .../utils/validation/SocialSecurityValidator.as    | 32 +++++++++++++++-------
 1 file changed, 22 insertions(+), 10 deletions(-)

diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/validation/SocialSecurityValidator.as
b/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/validation/SocialSecurityValidator.as
index 3d7eb79..ea62ad3 100644
--- a/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/validation/SocialSecurityValidator.as
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/validation/SocialSecurityValidator.as
@@ -229,10 +229,13 @@ package org.apache.flex.utils.validation
 			allowedFormatCharsOverride = value;
 
 			_allowedFormatChars = value != null ?
-								value :
-								resourceManager.getString(
-									"validators",
-									"socialSecurityValidatorAllowedFormatChars");
+								value : "()- .+";
+			// TODO get from resource bundle
+			// _allowedFormatChars = value != null ?
+			// 					value :
+			// 					resourceManager.getString(
+			// 						"validators",
+			// 						"socialSecurityValidatorAllowedFormatChars");
 		}
 
 		//--------------------------------------------------------------------------
@@ -283,6 +286,9 @@ package org.apache.flex.utils.validation
 			invalidCharErrorOverride = value;
 
 			_invalidCharError = value != null ?
+								value : "You entered invalid characters in your Social Security number.";
+			// TODO get from resource bundle
+			_invalidCharError = value != null ?
 								value :
 								resourceManager.getString(
 									"validators", "invalidCharErrorSSV");
@@ -328,9 +334,12 @@ package org.apache.flex.utils.validation
 			wrongFormatErrorOverride = value;
 
 			_wrongFormatError = value != null ?
-								value :
-								resourceManager.getString(
-									"validators", "wrongFormatError");
+								value : "The Social Security number must be 9 digits or in the form NNN-NN-NNNN.";
+			// TODO get from resource bundle
+			// _wrongFormatError = value != null ?
+			// 					value :
+			// 					resourceManager.getString(
+			// 						"validators", "wrongFormatError");
 		}
 
 		//----------------------------------
@@ -373,9 +382,12 @@ package org.apache.flex.utils.validation
 			zeroStartErrorOverride = value;
 
 			_zeroStartError = value != null ?
-							value :
-							resourceManager.getString(
-								"validators", "zeroStartError");
+							value :  "Invalid Social Security number; the number cannot start with 000.";
+			// TODO get from resource bundle
+			// _zeroStartError = value != null ?
+			// 				value :
+			// 				resourceManager.getString(
+			// 					"validators", "zeroStartError");
 		}
 
 		//--------------------------------------------------------------------------

-- 
To stop receiving notification emails like this one, please contact
['"commits@royale.apache.org" <commits@royale.apache.org>'].

Mime
View raw message