• Visitors can check out the Forum FAQ by clicking this link. You have to register before you can post: click the REGISTER link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. View our Forum Privacy Policy.
  • Want to receive the latest contracting news and advice straight to your inbox? Sign up to the ContractorUK newsletter here. Every sign up will also be entered into a draw to WIN £100 Amazon vouchers!

Spec for email address validation?

Collapse
X
  •  
  • Filter
  • Time
  • Show
Clear All
new posts

    Spec for email address validation?

    Guys,

    I'm writing some business rules for a web site and when a user enters an email address, I want to validate that the email address looks valid before writing it to back end sytems. Is there a standard for this? I found RFC 2822, should I just refer to that or would that lead to problems?

    Any guidance would be appreciated.

    #2
    Originally posted by Hiram King Of Tyre View Post
    Guys,

    I'm writing some business rules for a web site and when a user enters an email address, I want to validate that the email address looks valid before writing it to back end sytems. Is there a standard for this? I found RFC 2822, should I just refer to that or would that lead to problems?

    Any guidance would be appreciated.
    The email address has to contain only 1 @ and a minimum of one '.'

    You could also try dns validation also.

    Or have I missed the point

    Comment


      #3
      [email protected] is a good start but I think there are also invalid characters such as #$~ etc

      Comment


        #4
        http://haacked.com/archive/2007/08/2...s-until-i.aspx
        Where are we going? And what’s with this hand basket?

        Comment


          #5
          Yes, I found that. I'm not looking for a regular expression or technically how to carry out the validation, just what to put in a use case to ensure that the validation is carried out correctly....

          Comment


            #6
            Originally posted by Hiram King Of Tyre View Post
            Yes, I found that. I'm not looking for a regular expression or technically how to carry out the validation, just what to put in a use case to ensure that the validation is carried out correctly....
            Not entirely clear on what you're after, but can you not infer what you want from the article?
            Where are we going? And what’s with this hand basket?

            Comment


              #7
              Originally posted by Hiram King Of Tyre View Post
              Yes, I found that. I'm not looking for a regular expression or technically how to carry out the validation, just what to put in a use case to ensure that the validation is carried out correctly....
              Just put that the address must not contain
              : ( ) < > [ ] , ; : \ / " etc.... or what ever is in the spec mentioned above.

              Comment


                #8
                Originally posted by Hiram King Of Tyre View Post
                Yes, I found that. I'm not looking for a regular expression or technically how to carry out the validation, just what to put in a use case to ensure that the validation is carried out correctly....
                The validation would be....

                At least 1 alphanumeric character followed by exactly 1 @ [followed by at least 1 alphanumeric character followed by 1 dot]* followed by resolving domain suffix which must be resolvable by DNS.

                The assumption is that the DNS server does have a valid MX record and that the email address is RFC compliant.

                You can sepcify various exclusions (such as no ', *, , ,#, etc.)

                * represents at least 1 iteration (in this example). Modify the wording accordingly.
                If your company is the best place to work in, for a mere £500 p/d, you can advertise here.

                Comment


                  #9
                  I use an MX lookup to check that the domain is registered for receiving email.
                  Best Forum Advisor 2014
                  Work in the public sector? You can read my FAQ here
                  Click here to get 15% off your first year's IPSE membership

                  Comment


                    #10
                    Originally posted by Hiram King Of Tyre View Post
                    Yes, I found that. I'm not looking for a regular expression or technically how to carry out the validation, just what to put in a use case to ensure that the validation is carried out correctly....
                    RFC 2822 is the specification, so stating that validation should conform to it really ought to be all you have to say.

                    Comment

                    Working...
                    X