1 Reply Latest reply on Jun 3, 2009 12:06 PM by stickamw


    Zolotoj Level 3

      Is it possible to set the suffix (the top level domain)  to 3 characters long only? Another words, the email is not validated untill the suffix has 3 characters and 3 only entered?



        • 1. Re: EmailValidator
          stickamw Level 1



               I don't think you can change the domain length checking on the emailValidator...it's defaulted to allowing 2,3,4 or 6 char's long, without any options to limit that.


               The next soltution would be to write a simple regex function that does your email validation instead of using the builtin.


               Also, I'd take a look at extending the EmailValidator.as class.  Under the public static function validateEmail, there is a condition check being done:


                              if (lastDomain.length != 3 &&
                                  lastDomain.length != 2 &&
                                  lastDomain.length != 4 &&
                                  lastDomain.length != 6)


               You might take a look at overriding that for your uses and creating an extended EmailValidator for your project.




          1 person found this helpful