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 · 4 comments
Closed

Support option to allow longer email addresses #1

AdriVanHoudt opened this issue Jul 9, 2019 · 4 comments
Assignees
Labels
feature New functionality or improvement
Milestone

Comments

@AdriVanHoudt
Copy link

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
Copy link
Author

@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 this to the 2.0.1 milestone Sep 3, 2019
@hueniverse
Copy link
Contributor

Closed by bc728f7

@AdriVanHoudt
Copy link
Author

Thanks for this!

@Marsup Marsup added feature New functionality or improvement and removed request labels Sep 20, 2019
@lock
Copy link

lock bot commented Jan 9, 2020

This thread has been automatically locked due to inactivity. Please open a new issue for related bugs or questions following the new issue template instructions.

@lock lock bot locked as resolved and limited conversation to collaborators Jan 9, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature New functionality or improvement
Projects
None yet
Development

No branches or pull requests

3 participants