How faulty checking for valid email addresses can hurt you
11–18 of 18 posts
Re: How faulty checking for valid email addresses can hurt you
#12There's no way to get around invalid email addresses. Anybody can put in something like asdhsouhdosd@ahsoufhsdof.com and it would pass most regex checks. I think the best solution is to just check for an "@" sign and a "." after it.
Re: How faulty checking for valid email addresses can hurt you
#13My current policy on validating email addresses is to issue a warning if a given email address fails a check against a standard that covers the vast majority of addresses in use. Validating against the whole range of possible address content is near pointless. The warning simply asks the user to check their email in case of errors but allows a page submission following the display of that warning.
My current policy on validating email addresses is to issue a warning if a given email address fails a check against a standard that covers the vast majority of addresses in use. My policy on validating email addresses is "if I send you an email and it arrives, your email address is valid". Why do you need to "validate" an email address? Knowing that an address is syntactically valid doesn't do anything to confirm th…
However, knowing that an address is syntactically invalid does confirm that it won't reach the intended target. If you don't mess up the validation.
Might be better than having the user wait infinitely for an important transactional email that will never arrive because of a dumb typo.
Re: How faulty checking for valid email addresses can hurt you
#14We check for an MX record associated with the domain, and leave it at that. I'd rather deal with spam than lose a customer.
Re: How faulty checking for valid email addresses can hurt you
#15We check for an MX record associated with the domain, and leave it at that. I'd rather deal with spam than lose a customer.
a domain without MX records is valid. if a domain/host doesn't have an MX record, MTAs are supposed to try delivering to the domain/host itself.
Re: How faulty checking for valid email addresses can hurt you
#16Re: How faulty checking for valid email addresses can hurt you
#17My current policy on validating email addresses is to issue a warning if a given email address fails a check against a standard that covers the vast majority of addresses in use. Validating against the whole range of possible address content is near pointless. The warning simply asks the user to check their email in case of errors but allows a page submission following the display of that warning.
Mine is not to re-write the wheel. Writing a correct email address is indeed non-trivial, but there's at least one well known module written by someone who's actually read the RFCs and won't trash users using plussing and minusing. Use that, don't write your own.
It's possible to have a 6 character email address, but for most users checking that they have entered more than 6 chars would be good.