If I enter, say, "user@gmail" for the email address it passes through as-is when, I assume, it should be flagged as invalid.
I feel like I'm missing something because the module is so simple but I don't see any options, really. And I know the module is working because it created a new mailto link on the address.
Comments
Comment #1
drewish commentedthat could be valid email address... root@localhost would end up in admin's inbox on most unit machines.
Comment #2
butler360 commentedAh, I see. Is there any way to force the module to not allow that? We've had a few users enter something like I mentioned above, "user@gmail" and while usually it's apparent what they mean (such as with gmail) other times it's not. I never have any use for root@localhost anyways.
Comment #3
locomo commented+1 on more validation options
the root@localhost example seems to be a rather extreme exception to me .. but it would certainly be nice to be able to configure for that if needed
it seems that in the vast majority of cases being able to validate on an email address with a valid external email address is what is desired
Comment #4
RobertPope commentedHey guys - sorry I don't have time to roll this in a patch - but there is an easy answer - The email case 'validate' (in the email field module) uses drupal's core email validation function (which we don't want to use in this case) - so I modified it like this:
and then pasted in google-code email validation located here at the end of the email module:
http://code.google.com/p/php-email-address-validation/source/browse/trun...
code is pasted here for reference:
Comment #5
lostchord commentedYou probably want to do something like this:
http://www.webdigi.co.uk/blog/2009/how-to-check-if-an-email-address-exis...
The fact that the address is syntactically correct does not prove that it exists.
cheers
Comment #6
danny englanderThis is perfect, just what I was searching for, #4 worked.
It would great at one point to see a UI setting to allow only emails with an actual domain attached. I agree with the above, "email@localhost" is an extreme case.
Comment #7
dkinzer commentedI agree that because email@localhost is the exception it should be dealt with like any other exception in validation (as in validate this pattern as OK).
Comment #8
DrewMathers commentedThis module reportedly uses the technique from the link in #5
http://drupal.org/project/email_verify
Comment #9
butler360 commentedWell, there's two different validations. One is for whether the email address really exists. The other (which I what I was looking for) is just to make sure the person doesn't make a dumb mistake, like "user@gmail."
And while root@localhost may be a valid email address, how often is that address going to be put into a form? I agree that an option in the interface would be best.