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.
fix(isEmail): blacklist character check fix for validatorjs#2392 (val…
- Loading branch information
1 parent
08257b5
commit 3448e9d
Showing
2 changed files
with
8 additions
and
4 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -265,12 +265,15 @@ describe('Validators', () => { | |
it('should not validate email addresses with blacklisted chars in the name', () => { | ||
test({ | ||
validator: 'isEmail', | ||
args: [{ blacklisted_chars: 'abc' }], | ||
args: [{ blacklisted_chars: 'abc"' }], | ||
valid: [ | ||
'[email protected]', | ||
], | ||
invalid: [ | ||
'[email protected]', | ||
'"foobr"@example.com', | ||
'" foo m端ller "@example.com', | ||
'"foo\@br"@example.com', | ||
], | ||
}); | ||
}); | ||
|