Is it worth checking for other weird crap that Number converts to 0 like "false" and "null" and I think other whitespace?
On 4/29/13 10:31 PM, "[email protected]" <[email protected]> wrote: > Updated Branches: > refs/heads/develop 32aa4a226 -> 18b0dc3ac > > > FLEX-23614 fix so that 1.1..1 or similar is 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/bf540f6c > Tree: http://git-wip-us.apache.org/repos/asf/flex-sdk/tree/bf540f6c > Diff: http://git-wip-us.apache.org/repos/asf/flex-sdk/diff/bf540f6c > > Branch: refs/heads/develop > Commit: bf540f6cd5ab49ec3d41536e9d4f4415399b1f35 > Parents: 32aa4a2 > Author: Justin Mclean <[email protected]> > Authored: Tue Apr 30 15:10:10 2013 +1000 > Committer: Justin Mclean <[email protected]> > Committed: Tue Apr 30 15:10:10 2013 +1000 > > ---------------------------------------------------------------------- > .../framework/src/mx/validators/EmailValidator.as | 4 ++-- > 1 files changed, 2 insertions(+), 2 deletions(-) > ---------------------------------------------------------------------- > > > http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/bf540f6c/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 5217fa2..9c864dd 100644 > --- a/frameworks/projects/framework/src/mx/validators/EmailValidator.as > +++ b/frameworks/projects/framework/src/mx/validators/EmailValidator.as > @@ -346,7 +346,7 @@ public class EmailValidator extends Validator > { > item = parseInt(ipArray[i], 16); > > - if (isNaN(item) || item < 0 || item > 0xFFFF) > + if (isNaN(item) || item < 0 || item > 0xFFFF || ipArray[i] == "") > return false; > } > } > @@ -381,7 +381,7 @@ public class EmailValidator extends Validator > for (i = 0; i < n; i++) > { > item = Number(ipArray[i]); > - if (isNaN(item) || item < 0 || item > 255) > + if (isNaN(item) || item < 0 || item > 255 || ipArray[i] == "") > return false; > } > > -- Alex Harui Flex SDK Team Adobe Systems, Inc. http://blogs.adobe.com/aharui
