fix(isEmail): reject quoted emails with blacklisted characters
Fix (email-validation): reject quoted emails with blacklisted characters
Pointed out in issue 2392 - isEmail does not reject emails when blacklisted_chars includes quote. To resolve this issue, the email validation function should be updated to properly enforce the blacklisting of quotes in the user part of the email. This can be achieved by:
- Modifying the validation logic to check for blacklisted characters specifically in the user part of the email before further processing.
- Implementing unit tests to cover various scenarios, including those provided above, to ensure that quotes are effectively excluded from valid email addresses.
Checklist
- [x] PR contains only changes related; no stray files, etc.
- [ ] README updated (where applicable)
- [ ] Tests written (where applicable)
- [x] References provided in PR (where applicable)
Let’s banish those quote villains from our emails! 🚫💬 Your feedback is gold! 💰
@alokdwivedi103 Add tests too
Added tests @rubiin
@rubiin can you please help me close this pr as it is being pending for 2 weeks Thanks..
We've merged https://github.com/validatorjs/validator.js/pull/2414 in the past. Why do we need this additional one?