Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Regex give me a positive when it should be negative #80

Open
trenyture opened this issue Dec 20, 2023 · 1 comment · May be fixed by #92
Open

Regex give me a positive when it should be negative #80

trenyture opened this issue Dec 20, 2023 · 1 comment · May be fixed by #92

Comments

@trenyture
Copy link

trenyture commented Dec 20, 2023

I have a user who could register in our database while his email is not a valid one : ĥ[email protected]

When I tested it, the regex said it's a valid one when it should not...

> await validate({ email: [email protected]", validateRegex: true, validateMx: true, validateTypo: true, validateDisposable: true, validateSMTP: false })

{
  valid: true,
  validators: {
    regex: { valid: true },
    typo: { valid: true },
    disposable: { valid: true },
    mx: { valid: true },
    smtp: { valid: true }
  }
}
@eternal-flame-AD
Copy link

eternal-flame-AD commented Feb 13, 2025

There are UTf-8 emails and they are technically valid (I have one and it is very finicky to work with but are valid), however they are almost never useful (nor do I think this library handle it correctly in the SMTP validation by checking required extensions), HTML <input> and many email providers don't take them.

I have a stricter patch that aligns more to the standards of expectation for web development in #92.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants