• Validating E-mails (97 and >)

    Author
    Topic
    #382060

    hello Loungers

    Sorry to bother you, but is there a better way to check if an e-mail entered by the user is in the right format?

    That is I can check to see if there is a @ sign, or maybe it the e-mail has .com at the end of it, but then there are a lot of domains and if you are say in another country then the .com might not be the last thing in the string.

    I was trying to see if I get an error if I use the hyperlink, and do a mailto, but that is also not so accurate.

    I have the user enter e-mails in a textbox on the userform, and I need to vaidate that entry before moving on. Mind you I don’t want to validate if the e-mail is working, just its format.

    Thanks for any suggestions?

    Wassim

    Viewing 0 reply threads
    Author
    Replies
    • #646475

      Wassim

      I do not believe that there is a validation method that works short of sending a mail and confirming that a response comes back from a real person.

      The only syntax check possible is that it is a text string with no spaces, the @ sign and at least one full stop somewhere after the @ sign.
      Even then you will be defeated by users who really want to hide their real email address by entering a validly formatted one.
      e.g. nowhere@nowhere.com is likely to be invalid

      • #646668

        Hello Wassim,

        There is an additional check you could make if you want to make the effort.
        You could verify the entry after the last dot by using a lookup table or array containing all the country codes plus the conventional endings… com, net, gov, edu etc.
        I complied a list of 256 country codes to satisfy my curiosity about where people were posting from.
        You can do the same by melding lists from…

        http://www-old.ics.uci.edu/pub/websoft/www…untry-codes.txt
        http://www.iso.org/iso/en/prods-services/i…t-en1-semic.txt

        There are other very similar lists available by doing a google search for “country codes”.

        Hope this helps.

        Jim Cone
        San Francisco, CA

    Viewing 0 reply threads
    Reply To: Validating E-mails (97 and >)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: