So now we back to the short regex for EAI address validation at same time it will be good to have more patterns to test and make any necessary changes. FYI, I used this regex with bootstrap and query for the client side validation and use it inside the Java code for server side validation. Sent from my iPhone
On Aug 15, 2020, at 4:55 PM, John Levine <john.levine@standcore.com> wrote:
In article <14D6CA6C-2F5F-4FAB-8602-41B700DB727E@viagenie.ca>, Marc Blanchet <marc.blanchet@viagenie.ca> wrote:
The recommendation I made during the Java tutorial on UA is as follows: - use a simple regex to throw out the basic errors (example: an (EAI email address must have a « @ « and at least one « . » on the right side; you can enhance this a bit, but if you go too much, then you start getting into trouble) - use a library for verifying IDNA. - there is not that much one can do on the left side of an EAI email address. maybe just verifying it is a valid UTF-8 string.
John Levine also wrote similarly in a previous email in this thread.
You can do a little more validation of the mailbox to be sure it follows the syntax rules, e.g., doesn't have two unquoted dots in a row. For practical purposes I would also exclude % and ! which used to be (ab)used for source routing and are likely to fail.
-- Regards, John Levine, johnl@taugh.com, Primary Perpetrator of "The Internet for Dummies", Please consider the environment before reading this e-mail. https://jl.ly _______________________________________________ UA-discuss mailing list UA-discuss@icann.org https://mm.icann.org/mailman/listinfo/ua-discuss _______________________________________________ By submitting your personal data, you consent to the processing of your personal data for purposes of subscribing to this mailing list accordance with the ICANN Privacy Policy (https://www.icann.org/privacy/policy) and the website Terms of Service (https://www.icann.org/privacy/tos). You can visit the Mailman link above to change your membership status or configuration, including unsubscribing, setting digest-style delivery or disabling delivery altogether (e.g., for a vacation), and so on.