flex-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Harui <aha...@adobe.com>
Subject Re: [2/2] git commit: [flex-sdk] - FLEX-24197 user name starting with a dot shoudl be invalid
Date Tue, 30 Apr 2013 16:20:57 GMT
Is "." the only first character that is illegal?  What about other
punctuation and symbols?  Or is it not worth checking for?


On 4/29/13 10:31 PM, "jmclean@apache.org" <jmclean@apache.org> wrote:

> FLEX-24197 user name starting with a dot shoudl be invalid
> 
> 
> Project: http://git-wip-us.apache.org/repos/asf/flex-sdk/repo
> Commit: http://git-wip-us.apache.org/repos/asf/flex-sdk/commit/18b0dc3a
> Tree: http://git-wip-us.apache.org/repos/asf/flex-sdk/tree/18b0dc3a
> Diff: http://git-wip-us.apache.org/repos/asf/flex-sdk/diff/18b0dc3a
> 
> Branch: refs/heads/develop
> Commit: 18b0dc3ac77ef6b3fedbdcd25c78ed4abf0d9768
> Parents: bf540f6
> Author: Justin Mclean <jmclean@apache.org>
> Authored: Tue Apr 30 15:30:56 2013 +1000
> Committer: Justin Mclean <jmclean@apache.org>
> Committed: Tue Apr 30 15:30:56 2013 +1000
> 
> ----------------------------------------------------------------------
>  .../framework/src/mx/validators/EmailValidator.as  |    9 +++++++++
>  1 files changed, 9 insertions(+), 0 deletions(-)
> ----------------------------------------------------------------------
> 
> 
> http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/18b0dc3a/frameworks/proje
> cts/framework/src/mx/validators/EmailValidator.as
> ----------------------------------------------------------------------
> diff --git a/frameworks/projects/framework/src/mx/validators/EmailValidator.as
> b/frameworks/projects/framework/src/mx/validators/EmailValidator.as
> index 9c864dd..f928371 100644
> --- a/frameworks/projects/framework/src/mx/validators/EmailValidator.as
> +++ b/frameworks/projects/framework/src/mx/validators/EmailValidator.as
> @@ -173,6 +173,15 @@ public class EmailValidator extends Validator
> }
> }
> 
> +  // name can't start with a dot
> +  if (username.charAt(0) == '.')
> +  {
> +   results.push(new ValidationResult(
> +    true, baseField, "invalidChar",
> +    validator.invalidCharError));
> +   return results;
> +  }
> +  
> var domainLen:int = domain.length;
> 
> // check for IP address
> 

-- 
Alex Harui
Flex SDK Team
Adobe Systems, Inc.
http://blogs.adobe.com/aharui


Mime
View raw message