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

Consider alternative implementation for email validation #336

Open
spotlesscoder opened this issue Jun 30, 2024 · 1 comment
Open

Consider alternative implementation for email validation #336

spotlesscoder opened this issue Jun 30, 2024 · 1 comment

Comments

@spotlesscoder
Copy link

I find this kind of implementation more straight forward than the current one
https://github.com/apache/commons-validator/blob/master/src/main/java/org/apache/commons/validator/routines/EmailValidator.java

also, this could be re-used in the sense to have a "domain" validator (they use a separate validator to validate the email's domain part that could also be used to validate a domain string on it's own)
also, they provide a lot of test cases you might want to add to your tests as well: https://github.com/apache/commons-validator/blob/master/src/test/java/org/apache/commons/validator/routines/EmailValidatorTest.java#L56

@Keats
Copy link
Owner

Keats commented Jul 1, 2024

I kind of like matching the HTML validation, what would we get by changing the implementation?

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

No branches or pull requests

2 participants