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

Email Validation Broken #57

Open
blangel-nydig opened this issue Dec 29, 2020 · 0 comments
Open

Email Validation Broken #57

blangel-nydig opened this issue Dec 29, 2020 · 0 comments

Comments

@blangel-nydig
Copy link

Expected Behavior

brian.langel+test@test.com should be a valid email. However, since the . is prior to the + the regex rejects this.

Actual Behavior

brian.langel+test@test.com is rejected because the . is prior to the +

Steps to Reproduce the Problem

  1. Validate a value with a . prior to a +
  2. The value is rejected but shouldn't be

Example Code or Link to a Project

validate("brian.langel+test@test.com")
            .isEmail()

Environment

  • Valiktor version: valiktor-core 0.12.0
  • JDK/JRE version: 1.8
  • Platform/OS: Mac OS

Links

Consider using a regular expression more conformant to RFC 5322 as documented here with a proposed RegEx here

markus1189 added a commit to markus1189/valiktor that referenced this issue Feb 15, 2021
As noted in valiktor#57, the current Regex is broken for Emails like:

```
foo.bar+mysuffix@gmail.com
```

Therefore, exchange the used regex with the one from emailregex.com.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant