1
0
Fork 0
mirror of https://github.com/pgpainless/pgpainless.git synced 2025-12-09 22:01:10 +01:00

Add some more tests for valid email address formats

This commit is contained in:
Paul Schaub 2022-12-22 15:01:10 +01:00
parent a376587680
commit 533b54a6b7
Signed by: vanitasvitae
GPG key ID: 62BEE9264BF17311
2 changed files with 97 additions and 0 deletions

View file

@ -82,6 +82,12 @@ public final class UserId implements CharSequence {
* </ul>
* In these cases, {@link #parse(String)} will detect email addresses, names and comments and expose those
* via the respective getters.
* This method does not support parsing mail addresses of the following formats:
* <ul>
* <li>Local domains without TLDs (<pre>user@localdomain1</pre>)</li>
* <li><pre>" "@example.org</pre> (spaces between the quotes)</li>
* <li><pre>"very.(),:;<>[]\".VERY.\"very@\\ \"very\".unusual"@strange.example.com</pre></li>
* </ul>
*
* @see <a href="https://www.rfc-editor.org/rfc/rfc5322#page-16">RFC5322 §3.4. Address Specification</a>
* @param string user-id