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

Add international email validator #2829

Merged
merged 4 commits into from May 19, 2022
Merged

Add international email validator #2829

merged 4 commits into from May 19, 2022

Conversation

BennyDeBock
Copy link
Member

Since it's hard to get a regex that works for both unicode character emails and utf8 emails, add a extra validator for international emails.
Adds an international email validator conforming to this regex that works for unicode characters.

Also adds tests.
Increase the max characters of an email to 255

closes #2815

@BennyDeBock BennyDeBock requested a review from 0xTim May 17, 2022 14:26
@BennyDeBock BennyDeBock marked this pull request as ready for review May 17, 2022 14:26
Copy link
Member

@0xTim 0xTim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Couple of small nits

Sources/Vapor/Validation/Validators/Email.swift Outdated Show resolved Hide resolved
Sources/Vapor/Validation/Validators/Email.swift Outdated Show resolved Hide resolved
@0xTim
Copy link
Member

0xTim commented May 17, 2022

@heidipuk does this work for you?

@heidipuk
Copy link

@0xTim yes, that should work for our use case 😄

@0xTim 0xTim merged commit 7c9c9dd into main May 19, 2022
@0xTim 0xTim deleted the bug/GermanEmailFails branch May 19, 2022 14:28
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.

Email validator doesn't support ß
3 participants