Skip to content

Commit 4936381

Browse files
committed
Provided regex that may be used for validation
1 parent e1947bf commit 4936381

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

scalars/contributed/Juke-Duke/email-address.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,11 @@ These are invalid examples:
6969
| `QA[icon]CHOCOLATE[icon]@test.com` | Non UTF-8 characters are not allowed in the local component. |
7070
| `[email protected]` | Top-level domains cannot be all numerical. |
7171

72+
This regex provided below follows the above examples:
73+
```regex
74+
^(?!\.)(?!.*\.\.)[a-zA-Z0-9!#$%&'*+-/=?^_`{|}~\.]{0,63}[^\.]@(?!\-)[a-zA-Z0-9-]+[^\-]\.?(?!\d+$)[a-zA-Z0-9]{2,255}$
75+
```
76+
7277
# Name
7378

7479
The recommended name is `EmailAddress`. Alternatives may be `Email`, `E-Mail`, `MailAddress`.

0 commit comments

Comments
 (0)