-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(isURL): add option to reject email-like URLs (#901)
- Loading branch information
Showing
6 changed files
with
25 additions
and
2 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
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 |
---|---|---|
|
@@ -580,6 +580,20 @@ describe('Validators', () => { | |
}); | ||
}); | ||
|
||
it('should allow rejecting urls containing authentication information', () => { | ||
test({ | ||
validator: 'isURL', | ||
args: [{ disallow_auth: true }], | ||
valid: [ | ||
'doe.com', | ||
], | ||
invalid: [ | ||
'[email protected]', | ||
'john:[email protected]', | ||
], | ||
}); | ||
}); | ||
|
||
it('should validate MAC addresses', () => { | ||
test({ | ||
validator: 'isMACAddress', | ||
|
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
Large diffs are not rendered by default.
Oops, something went wrong.