Skip to content

isEmail does not reject emails when blacklisted_chars includes quote #2392

Open
@krichards

Description

@krichards

Describe the bug
I'm trying to exclude quotes from the lower part of an email, and I can't see an explicit flag for that, but I can see you can use blacklisted_characters, however nothing that I've tried allows me to blacklist ".

validator.default.isEmail(email, {
blacklisted_chars: '"'
})

I would expect the validator to reject the following but it doesn't

Examples

'"foobar"@example.com',
'" foo m端ller "@example.com',
'"foo\@bar"@example.com',

Additional context
Validator.js version: 13.11.0
Node.js version: 20.11.1
OS platform: linux

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions