You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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.
lockbot
locked as resolved and limited conversation to collaborators
Jan 9, 2020
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
The text was updated successfully, but these errors were encountered: