feat(isEmail): add `host_blacklist` option by fedeci · Pull Request #1641 · validatorjs/validator.js
We add an option to allow the user to exclude some specific domains from isEmail validation.
Fixes #1639
Checklist
- PR contains only changes related; no stray files, etc.
- README updated (where applicable)
- Tests written (where applicable)
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A little suggestion, we have a similar option in isURL called host_whitelist and host_blacklist that accepts hosts and regexes. What do you think about matching that behaviour to have consistency between validators options?
It makes sense but I would keep the denylist instead of blacklist to use an inclusive language at least in new options.
I have nothing against blacklist and whitelist, but someone may be offended by such terms.
It makes sense but I would keep the
denylistinstead ofblacklistto use an inclusive language at least in new options.I have nothing against
blacklistandwhitelist, but someone may be offended by such terms.
Project maintainer views on this matter have already been shared here #1522
fedeci
changed the title
feat(isEmail): add
feat(isEmail): add domain_denylist optionhost_blacklist option
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🎉
Sorry for the long review delay, i missed the notification about new commits in this PR !
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
fedeci
deleted the
email-domain-denylist
branch
This file contains hidden or 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