3 ms·
Two options: - use a library that implements RFC 5322 properly. - don't validate the email address (that is, don't try to reject most invalid addresses) and j
by littlestymaar 4y ago
Two options:
- use a library that implements RFC 5322 properly.
- don't validate the email address (that is, don't try to reject most invalid addresses) and just check that the field contains at least one `@` to be sure the user didn't enter something else than his email address by accident.
Tying to perform email address validation with regex you're writing yourself is the best way to reject perfectly acceptable email address and get frustrated users.