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

E-mail validation #12

Merged
merged 3 commits into from
Oct 12, 2023
Merged

E-mail validation #12

merged 3 commits into from
Oct 12, 2023

Conversation

mbernson
Copy link
Member

@mbernson mbernson commented May 25, 2023

A common thing to validate in a (web) application are e-mail addresses. However, they are notoriously difficult to correctly validate, because e-mail addresses are complicated and there are lots of rules and exceptions.

For the email validator in this library, we have chosen the WHATWG HTML living standard as a reference. Hence the validator uses a regex that comes from the WHATWG HTML spec document:
https://html.spec.whatwg.org/multipage/input.html#valid-e-mail-address

We implement a bunch of unit tests in ValidationKit to demonstrate cases of valid and invalid email addresses.

@mbernson mbernson marked this pull request as draft May 25, 2023 12:25
@mbernson mbernson force-pushed the feature/email-validation branch from 5375076 to 932d3c6 Compare October 12, 2023 09:43
@mbernson mbernson marked this pull request as ready for review October 12, 2023 09:43
@mbernson mbernson merged commit 30834b7 into main Oct 12, 2023
1 check passed
@mbernson mbernson deleted the feature/email-validation branch October 12, 2023 09:58
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 this pull request may close these issues.

1 participant