You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@royale.apache.org by ha...@apache.org on 2017/09/30 23:55:04 UTC

[royale-asjs] branch feature/validation updated: Fixed email error messages

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 f9df94b  Fixed email error messages
f9df94b is described below

commit f9df94b77159045095776483aa68814515bb55dc
Author: Harbs <ha...@in-tools.com>
AuthorDate: Sun Oct 1 02:55:01 2017 +0300

    Fixed email error messages
---
 .../apache/flex/utils/validation/EmailValidator.as | 66 +++++++++++++++-------
 1 file changed, 45 insertions(+), 21 deletions(-)

diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/validation/EmailValidator.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/validation/EmailValidator.as
index f70f4dd..509698a 100644
--- a/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/validation/EmailValidator.as
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/validation/EmailValidator.as
@@ -454,9 +454,12 @@ package org.apache.flex.utils.validation
 			invalidCharErrorOverride = value;
 
 			_invalidCharError = value != null ?
-								value :
-								resourceManager.getString(
-									"validators", "invalidCharErrorEV");
+								value : "Your e-mail address contains invalid characters.";
+			// TODO get from resource bundle
+			// _invalidCharError = value != null ?
+			// 					value :
+			// 					resourceManager.getString(
+			// 						"validators", "invalidCharErrorEV");
 		}
 		
 		//----------------------------------
@@ -500,9 +503,12 @@ package org.apache.flex.utils.validation
 			invalidDomainErrorOverride = value;
 
 			_invalidDomainError = value != null ?
-								value :
-								resourceManager.getString(
-									"validators", "invalidDomainErrorEV");
+								value : "The domain in your e-mail address is incorrectly formatted.";
+			// TODO get from resource bundle
+			// _invalidDomainError = value != null ?
+			// 					value :
+			// 					resourceManager.getString(
+			// 						"validators", "invalidDomainErrorEV");
 		}
 
 		//----------------------------------
@@ -545,9 +551,12 @@ package org.apache.flex.utils.validation
 			invalidIPDomainErrorOverride = value;
 
 			_invalidIPDomainError = value != null ?
-									value :
-									resourceManager.getString(
-										"validators", "invalidIPDomainError");
+									value : "The IP domain in your e-mail address is incorrectly formatted.";
+			// TODO get from resource bundle
+			// _invalidIPDomainError = value != null ?
+			// 						value :
+			// 						resourceManager.getString(
+			// 							"validators", "invalidIPDomainError");
 		}
 
 		//----------------------------------
@@ -590,9 +599,12 @@ package org.apache.flex.utils.validation
 			invalidPeriodsInDomainErrorOverride = value;
 
 			_invalidPeriodsInDomainError = value != null ?
-										value :
-										resourceManager.getString(
-											"validators", "invalidPeriodsInDomainError");
+										value : "The domain in your e-mail address has continous periods.";
+			// TODO get from resource bundle
+			// _invalidPeriodsInDomainError = value != null ?
+			// 							value :
+			// 							resourceManager.getString(
+			// 								"validators", "invalidPeriodsInDomainError");
 		}
 
 		//----------------------------------
@@ -635,9 +647,12 @@ package org.apache.flex.utils.validation
 			missingAtSignErrorOverride = value;
 
 			_missingAtSignError = value != null ?
-								value :
-								resourceManager.getString(
-									"validators", "missingAtSignError");
+								value : "An at sign (@) is missing in your e-mail address.";
+			// TODO get from resource bundle
+			// _missingAtSignError = value != null ?
+			// 					value :
+			// 					resourceManager.getString(
+			// 						"validators", "missingAtSignError");
 		}
 
 		//----------------------------------
@@ -680,9 +695,12 @@ package org.apache.flex.utils.validation
 			missingPeriodInDomainErrorOverride = value;
 
 			_missingPeriodInDomainError = value != null ?
-										value :
-										resourceManager.getString(
-											"validators", "missingPeriodInDomainError");
+										value : "The domain in your e-mail address is missing a period.";
+			// TODO get from resource bundle
+			// _missingPeriodInDomainError = value != null ?
+			// 							value :
+			// 							resourceManager.getString(
+			// 								"validators", "missingPeriodInDomainError");
 		}
 
 		//----------------------------------
@@ -725,9 +743,12 @@ package org.apache.flex.utils.validation
 			missingUsernameErrorOverride = value;
 
 			_missingUsernameError = value != null ?
-									value :
-									resourceManager.getString(
-										"validators", "missingUsernameError");
+									value : "The username in your e-mail address is missing.";
+			// TODO get from resource bundle
+			// _missingUsernameError = value != null ?
+			// 						value :
+			// 						resourceManager.getString(
+			// 							"validators", "missingUsernameError");
 		}
 
 		//----------------------------------
@@ -771,6 +792,9 @@ package org.apache.flex.utils.validation
 			tooManyAtSignsErrorOverride = value;
 
 			_tooManyAtSignsError = value != null ?
+								value : "Your e-mail address contains too many @ characters.";
+			// TODO get from resource bundle
+			_tooManyAtSignsError = value != null ?
 								value :
 								resourceManager.getString(
 									"validators", "tooManyAtSignsError");

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