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

Support option to allow longer email addresses #1

Closed
AdriVanHoudt opened this issue Jul 9, 2019 · 3 comments
Closed

Support option to allow longer email addresses #1

AdriVanHoudt opened this issue Jul 9, 2019 · 3 comments
Assignees
Labels
Milestone

Comments

@AdriVanHoudt
Copy link

@AdriVanHoudt AdriVanHoudt commented Jul 9, 2019

Hi,

Atm we use Joi 14 which uses isEmail to validate email addresses.
We use it like this: Joi.string().email({ errorLevel: 68 }).
As you can see we use the errorLevel to make the validation more relaxed, mainly for long email addresses.
Now the upgrade to a newer Joi version replaced isEmail with this module leaving us with no 'out of the box' option to migrate our email validation without breaking it.
I understand that this module tries to validate to spec as much as possible for our use case this strictness is just a bit too much (sadly :P).
The spec also states 4.5.3.1. Size Limits and Minimums [...] To the maximum extent possible, implementation techniques that impose no limits on the length of these objects should be used.
Would you consider an option to allow longer addresses and then exposing said option through Joi.email()?
I think it is mostly around this line https://github.com/hapijs/address/blob/master/lib/index.js#L98
If you want I can submit a PR for this.

@AdriVanHoudt

This comment has been minimized.

Copy link
Author

@AdriVanHoudt AdriVanHoudt commented Aug 2, 2019

@hueniverse friendly ping to get your opinion on this, would love to not have jump several major joi versions when 16 comes out :P

@hueniverse hueniverse self-assigned this Sep 3, 2019
@hueniverse hueniverse added the request label Sep 3, 2019
@hueniverse hueniverse added this to the 2.0.1 milestone Sep 3, 2019
@hueniverse

This comment has been minimized.

Copy link
Member

@hueniverse hueniverse commented Sep 3, 2019

Closed by bc728f7

@hueniverse hueniverse closed this Sep 3, 2019
@AdriVanHoudt

This comment has been minimized.

Copy link
Author

@AdriVanHoudt AdriVanHoudt commented Sep 6, 2019

Thanks for this!

@Marsup Marsup added feature and removed request labels Sep 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.