forked from validatorjs/validator.js
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: isEmail: validate display name using standards of RFC2822
- Loading branch information
Jin Huang
committed
Mar 19, 2019
1 parent
c0b905e
commit 42faca6
Showing
5 changed files
with
182 additions
and
183 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -178,6 +178,11 @@ describe('Validators', () => { | |
'Name <[email protected]>', | ||
'Name<[email protected]>', | ||
'Some Name <[email protected]>', | ||
'Name🍓With🍑Emoji🚴♀️🏆<[email protected]>', | ||
'🍇🍗🍑<[email protected]>', | ||
'"<displayNameInBrackets>"<[email protected]>', | ||
'"\\"quotes\\""<[email protected]>', | ||
'"name;"<[email protected]>', | ||
], | ||
invalid: [ | ||
'invalidemail@', | ||
|
@@ -195,6 +200,14 @@ describe('Validators', () => { | |
'Some Name < [email protected] >', | ||
'Name [email protected]', | ||
'Some Name <[email protected]>', | ||
'Some Name<emoji_in_address🍈@aftership.com>', | ||
'invisibleCharacter\u001F<[email protected]>', | ||
'<displayNameInBrackets><[email protected]>', | ||
'\\"quotes\\"<[email protected]>', | ||
'""quotes""<[email protected]>', | ||
'name;<[email protected]>', | ||
' <[email protected]>', | ||
'" "<[email protected]>', | ||
], | ||
}); | ||
}); | ||
|
Oops, something went wrong.