fixed issue #2432 by code0emperor · Pull Request #2437 · validatorjs/validator.js

an email of the type "example*@gmail.com was accepted due to an errant if statement in isEmail.js file which was only checking for the first double quote (user[0] === '"'). Fixed it by adding a secondary "and" condition along with it, to ensure the local part is completely enclosed in the double quotes (&& user[user.length - 1] === '"').

Checklist

  • PR contains only changes related; no stray files, etc.
  • README updated (where applicable)
  • Tests written (where applicable)
  • References provided in PR (where applicable)