Re:The Reason Java Is Still Popular
by littlestymaar on Thursday September 22, 2022 @04:15PM
(#32944051)
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.
- 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.