The email address you have been using for 10 years is not valid



  • @blakeyrat said:

    Yes and it's fine as long as joe.blow there admits it's his product that's in the wrong and the reason that he can't allow those email addresses is because his engineers fucked up when developing it.

    In my case it's because some tool was selected by non-technical people and it is cheaper to support the trash than replace it, but yeah I agree that there are issues that need to be acknowledged.

    @blakeyrat said:

    But to say that nothing should accept those email addresses, or that those email addresses are malicious or obfuscated, that's just insane crazytalk.

    I don't think that he meant nothing should accept them, but that for some things (and the only one he cares about it his thingy) that it shouldn't.



  • @Sutherlands said:

    And since regexes can't do either, the only way to do either is to send an email.
    Ah, and of course there are no other ways to validate the format of an email address, I mean no tried and tested methods that mean people don't have to reinvent the wheel. So glad we cleared that up.



  • @Ben L. said:

    @Sutherlands said:
    @ASheridan2 said:

    @Sutherlands said:

    The only way to validate an email is to send an email.
    There's a difference between validating an email address and validating the format of an email address.

    And since regexes can't do either, the only way to do either is to send an email.

    Regular expressions can validate the format of an email address. For example, email addresses cannot contain newlines and are at least one byte long.

    Validate: Check or prove the validity or accuracy of

    You're not validating anything.  You're improving the CHANCE that it's valid, but you're not validating it.

    @ASheridan2 said:

    @Sutherlands said:

    And since regexes can't do either, the only way to do either is to send an email.
    Ah, and of course there are no other ways to validate the format of an email address, I mean no tried and tested methods that mean people don't have to reinvent the wheel. So glad we cleared that up.

    Please provide me with an example that proves the validity of all email addresses.



  • @Sutherlands said:

    Validate: Check or prove the validity or accuracy of

    You're not validating anything.  You're improving the CHANCE that it's valid, but you're not validating it.

     

    Validating the FORMAT. What bit about this is so hard to understand? It's like using a regex to check a postcode/zip code format. Perfectly valid to check the format of it, but this doesn't guarantee that said postcode exists. I don't know why this simple thing is so difficult for you to understand.

    @Sutherlands said:

    Please provide me with an example that proves the validity of all email addresses.

     Again, read above. These checks are not to determine the validity of email addresses, only the validity of the format of those addresses.

    http://www.youtube.com/watch?v=i9en6AcVkBo

     

     



  • @ASheridan2 said:

    Validating the FORMAT. What bit about this is so hard to understand?
    So you think that any string without a newline and at least one byte long is a valid email FORMAT? What part of this conversation do you not understand?  All of it?  Also, you haven't provided a way to validate the FORMAT of an email.



  • @Sutherlands said:

    So you think that any string without a newline and at least one byte long is a valid email FORMAT? What part of this conversation do you not understand?  All of it?
    You seem to have a reading problem. Where did I say that any string without a newline and one character is a valid email format?

      @Sutherlands said:

    Also, you haven't provided a way to validate the FORMAT of an email.

    PHP has introduced a filter_var function for this sort of thing. I've not checked if it conforms exactly to the RFC spec, but there's your example that isn't using a regex.



  • @ASheridan2 said:

    I've not checked if it conforms exactly to the RFC spec
    If it doesn’t, then it’s fucking wrong. If it will reject any valid address or accept any invalid address it should be only used, at best, to show a warning, not reject outright. You know *@example.com is a valid email address, right?


  • Trolleybus Mechanic

    @Sutherlands said:

    Also, you haven't provided a way to validate the FORMAT of an email.
     

    [url="http://ex-parrot.com/~pdw/Mail-RFC822-Address.html"]Here you go[/url]

     

    (?:(?:\r\n)?[ \t])*(?:(?:(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t]
    )+|\Z|(?=[\["()<>@,;:\\".\[\]]))|"(?:[^\"\r\\]|\\.|(?:(?:\r\n)?[ \t]))*"(?:(?:
    \r\n)?[ \t])*)(?:\.(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(
    ?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|"(?:[^\"\r\\]|\\.|(?:(?:\r\n)?[ 
    \t]))*"(?:(?:\r\n)?[ \t])*))*@(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\".\[\] \000-\0
    31]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|\[([^\[\]\r\\]|\\.)*\
    ](?:(?:\r\n)?[ \t])*)(?:\.(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\".\[\] \000-\031]+
    (?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|\[([^\[\]\r\\]|\\.)*\](?:
    (?:\r\n)?[ \t])*))*|(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z
    |(?=[\["()<>@,;:\\".\[\]]))|"(?:[^\"\r\\]|\\.|(?:(?:\r\n)?[ \t]))*"(?:(?:\r\n)
    ?[ \t])*)*\<(?:(?:\r\n)?[ \t])*(?:@(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\
    r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|\[([^\[\]\r\\]|\\.)*\](?:(?:\r\n)?[
     \t])*)(?:\.(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)
    ?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|\[([^\[\]\r\\]|\\.)*\](?:(?:\r\n)?[ \t]
    )*))*(?:,@(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[
     \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|\[([^\[\]\r\\]|\\.)*\](?:(?:\r\n)?[ \t])*
    )(?:\.(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t]
    )+|\Z|(?=[\["()<>@,;:\\".\[\]]))|\[([^\[\]\r\\]|\\.)*\](?:(?:\r\n)?[ \t])*))*)
    *:(?:(?:\r\n)?[ \t])*)?(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+
    |\Z|(?=[\["()<>@,;:\\".\[\]]))|"(?:[^\"\r\\]|\\.|(?:(?:\r\n)?[ \t]))*"(?:(?:\r
    \n)?[ \t])*)(?:\.(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:
    \r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|"(?:[^\"\r\\]|\\.|(?:(?:\r\n)?[ \t
    ]))*"(?:(?:\r\n)?[ \t])*))*@(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\".\[\] \000-\031
    ]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|\[([^\[\]\r\\]|\\.)*\](
    ?:(?:\r\n)?[ \t])*)(?:\.(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\".\[\] \000-\031]+(?
    :(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|\[([^\[\]\r\\]|\\.)*\](?:(?
    :\r\n)?[ \t])*))*\>(?:(?:\r\n)?[ \t])*)|(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?
    :(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|"(?:[^\"\r\\]|\\.|(?:(?:\r\n)?
    [ \t]))*"(?:(?:\r\n)?[ \t])*)*:(?:(?:\r\n)?[ \t])*(?:(?:(?:[^()<>@,;:\\".\[\] 
    \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|"(?:[^\"\r\\]|
    \\.|(?:(?:\r\n)?[ \t]))*"(?:(?:\r\n)?[ \t])*)(?:\.(?:(?:\r\n)?[ \t])*(?:[^()<>
    @,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|"
    (?:[^\"\r\\]|\\.|(?:(?:\r\n)?[ \t]))*"(?:(?:\r\n)?[ \t])*))*@(?:(?:\r\n)?[ \t]
    )*(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\
    ".\[\]]))|\[([^\[\]\r\\]|\\.)*\](?:(?:\r\n)?[ \t])*)(?:\.(?:(?:\r\n)?[ \t])*(?
    :[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[
    \]]))|\[([^\[\]\r\\]|\\.)*\](?:(?:\r\n)?[ \t])*))*|(?:[^()<>@,;:\\".\[\] \000-
    \031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|"(?:[^\"\r\\]|\\.|(
    ?:(?:\r\n)?[ \t]))*"(?:(?:\r\n)?[ \t])*)*\<(?:(?:\r\n)?[ \t])*(?:@(?:[^()<>@,;
    :\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|\[([
    ^\[\]\r\\]|\\.)*\](?:(?:\r\n)?[ \t])*)(?:\.(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\"
    .\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|\[([^\[\
    ]\r\\]|\\.)*\](?:(?:\r\n)?[ \t])*))*(?:,@(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\".\
    [\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|\[([^\[\]\
    r\\]|\\.)*\](?:(?:\r\n)?[ \t])*)(?:\.(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\".\[\] 
    \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|\[([^\[\]\r\\]
    |\\.)*\](?:(?:\r\n)?[ \t])*))*)*:(?:(?:\r\n)?[ \t])*)?(?:[^()<>@,;:\\".\[\] \0
    00-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|"(?:[^\"\r\\]|\\
    .|(?:(?:\r\n)?[ \t]))*"(?:(?:\r\n)?[ \t])*)(?:\.(?:(?:\r\n)?[ \t])*(?:[^()<>@,
    ;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|"(?
    :[^\"\r\\]|\\.|(?:(?:\r\n)?[ \t]))*"(?:(?:\r\n)?[ \t])*))*@(?:(?:\r\n)?[ \t])*
    (?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".
    \[\]]))|\[([^\[\]\r\\]|\\.)*\](?:(?:\r\n)?[ \t])*)(?:\.(?:(?:\r\n)?[ \t])*(?:[
    ^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\]
    ]))|\[([^\[\]\r\\]|\\.)*\](?:(?:\r\n)?[ \t])*))*\>(?:(?:\r\n)?[ \t])*)(?:,\s*(
    ?:(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\
    ".\[\]]))|"(?:[^\"\r\\]|\\.|(?:(?:\r\n)?[ \t]))*"(?:(?:\r\n)?[ \t])*)(?:\.(?:(
    ?:\r\n)?[ \t])*(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[
    \["()<>@,;:\\".\[\]]))|"(?:[^\"\r\\]|\\.|(?:(?:\r\n)?[ \t]))*"(?:(?:\r\n)?[ \t
    ])*))*@(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t
    ])+|\Z|(?=[\["()<>@,;:\\".\[\]]))|\[([^\[\]\r\\]|\\.)*\](?:(?:\r\n)?[ \t])*)(?
    :\.(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|
    \Z|(?=[\["()<>@,;:\\".\[\]]))|\[([^\[\]\r\\]|\\.)*\](?:(?:\r\n)?[ \t])*))*|(?:
    [^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".\[\
    ]]))|"(?:[^\"\r\\]|\\.|(?:(?:\r\n)?[ \t]))*"(?:(?:\r\n)?[ \t])*)*\<(?:(?:\r\n)
    ?[ \t])*(?:@(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["
    ()<>@,;:\\".\[\]]))|\[([^\[\]\r\\]|\\.)*\](?:(?:\r\n)?[ \t])*)(?:\.(?:(?:\r\n)
    ?[ \t])*(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>
    @,;:\\".\[\]]))|\[([^\[\]\r\\]|\\.)*\](?:(?:\r\n)?[ \t])*))*(?:,@(?:(?:\r\n)?[
     \t])*(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,
    ;:\\".\[\]]))|\[([^\[\]\r\\]|\\.)*\](?:(?:\r\n)?[ \t])*)(?:\.(?:(?:\r\n)?[ \t]
    )*(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\
    ".\[\]]))|\[([^\[\]\r\\]|\\.)*\](?:(?:\r\n)?[ \t])*))*)*:(?:(?:\r\n)?[ \t])*)?
    (?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\["()<>@,;:\\".
    \[\]]))|"(?:[^\"\r\\]|\\.|(?:(?:\r\n)?[ \t]))*"(?:(?:\r\n)?[ \t])*)(?:\.(?:(?:
    \r\n)?[ \t])*(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[\[
    "()<>@,;:\\".\[\]]))|"(?:[^\"\r\\]|\\.|(?:(?:\r\n)?[ \t]))*"(?:(?:\r\n)?[ \t])
    *))*@(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])
    +|\Z|(?=[\["()<>@,;:\\".\[\]]))|\[([^\[\]\r\\]|\\.)*\](?:(?:\r\n)?[ \t])*)(?:\
    .(?:(?:\r\n)?[ \t])*(?:[^()<>@,;:\\".\[\] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z
    |(?=[\["()<>@,;:\\".\[\]]))|\[([^\[\]\r\\]|\\.)*\](?:(?:\r\n)?[ \t])*))*\>(?:(
    ?:\r\n)?[ \t])*))*)?;\s*)



  • @Lorne Kates said:

    @Sutherlands said:

    Also, you haven't provided a way to validate the FORMAT of an email.
     

    Here you go

    If you read that page carefully, it notes that the regex is only valid after a certain amount of preprocessing has been done on the email address. Because of certain quirks in the email address specs (yes, multiple, 822 is only the first) it's impossible for a standard regex parser to validate the format of an email without bruteforcing it. It requires programatic validation. http://isemail.info/about is one of the better validators on the net. Infinite nesting of comments (up to the length limit) is a real pain.


  • Considered Harmful

    @Shishire said:

    Infinite nesting of comments (up to the length limit) is a real pain.

    I know of some programming languages that need this "feature."

    /* commented out
     - snip 100 commented out lines -
    

    /* commented out

    • snip 5 lines -
      */ end comment

    • snip 100 not commented out lines -
      */ syntax error

    Not great practice, but sometimes I just want the build to work again after someone breaks it.



  • @ASheridan2 said:

    @Sutherlands said:
    So you think that any string without a newline and at least one byte long is a valid email FORMAT? What part of this conversation do you not understand?  All of it?
    You seem to have a reading problem. Where did I say that any string without a newline and one character is a valid email format?

    Ben L: Regular expressions can validate the format of an email address.  For example, email addresses cannot contain newlines and are at least one byte long.

    Sutherlands: You're not validating anything.

    ASheridan2: Validating the FORMAT. OMGWTFBBQ.

    You seem to have a comprehension problem.

    @Sir Twist said:

    @ASheridan2 said:

    I've not checked if it conforms exactly to the RFC spec
    If it doesn’t, then it’s fucking wrong. If it will reject any valid address or accept any invalid address it should be only used, at best, to show a warning, not reject outright. You know *@example.com is a valid email address, right?

    I think it's time to give up on him.



  • @Sutherlands said:

    Ben L: Regular expressions can validate the format of an email address.  For example, email addresses cannot contain newlines and are at least one byte long.

    Sutherlands: You're not validating anything.

    ASheridan2: Validating the FORMAT. OMGWTFBBQ.

    You seem to have a comprehension problem.

    Nope, you've still got a reading problem. Where did I say any string of text with no newline and at least 1 character is a valid email? In-fact, where did anyone say it? Ben gave an example of the sort of thing a regex could check for. A single example is not the whole sodding thing you idiot. Again, learn to read. It's not that hard, the points I'm making are something that any 10 year old could understand.

     



  • Ah, ok, so you're saying that's just PART of the system... so... since you have yet to provide me with a WHOLE system, I'm just supposed to assume that it exists for you, right?

    Also, before you point to some vague spot in some function, remember this:

    Email providers don't follow the RFC.  There are real email addresses that don't follow the RFC, just like there are domain names that don't follow the RFC.  That is why you can't do it without sending it.


  • Considered Harmful

    I think these people are missing completely that the purpose of form validation is just to screen the input for obvious problems, not to verify 100% conformance. It is a service to the user, so they don't accidentally enter in an input that's malformed. For example, you check that the email address has an @ sign (one thing I hope to $deity we can agree all addresses have) so they don't put their ZIP code in that box. And a dot after it (how controversial) because it is about a billion times more likely they hit comma instead of period than it is that they are using an @[IPv6] address.

    You know how many support calls my email regex has caused? Exactly zero. But it's probably prevented some.



  •  Do you boys want some fucking tea and cookies, goddamnit?



  • @Sutherlands said:

    Ah, ok, so you're saying that's just PART of the system... so... since you have yet to provide me with a WHOLE system, I'm just supposed to assume that it exists for you, right?
    I don't need to provide a whole example to prove my point.@Sutherlands said:
    That is why you can't do it without sending it.
    Email addresses are not just used to send email these days. A lot of systems (particularly instant messengers) use an email address as a "unique" identifier. You don't need to send an email in that case.



  • @dhromed said:

    Do you boys want some fucking tea and cookies, goddamnit?
    Yes, but I insist on double choc chip cookies.


  • ♿ (Parody)

    @dhromed said:

     Do you boys want some fucking tea and cookies, goddamnit?

    Last night, while watching Hawaii Five-O, I learned about Hawaiian moonshine made from the Ti plant (George Takai was a Hawaiian redneck moonshiner). I could go for some of that.



  • @ASheridan2 said:

    Email addresses are not just used to send email these days. A lot of systems (particularly instant messengers) use an email address as a "unique" identifier. You don't need to send an email in that case.
    If it's just a unique string, why do you need to validate it?  Do you plan on sending email to it?  If so, send an email.



  •  Clearly I'm not getting through to you. I give up. You've got the comprehension level of a child.


  • Trolleybus Mechanic

    @dhromed said:

     Do you boys want some fucking tea and cookies, goddamnit?

     

    I want a doughnut, because you can't fuck an Oreo.

     



  • @ASheridan2 said:

     Clearly I'm not getting through to you. I give up. You've got the comprehension level of a child.

    NO U.



  • @Lorne Kates said:

    I want a doughnut, because you can't fuck an Oreo.
     

    The question is, how many doughnuts can you carry?



  • @dhromed said:

    @Lorne Kates said:

    I want a doughnut, because you can't fuck an Oreo.
     

    The question is, how many doughnuts can you carry?

    I believe the answer is half of a Donette.


Log in to reply