We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I am trying to validate a .co.uk email address using the email.tlds.allow option.
.co.uk
I am testing using your joi Schema Tester v17.1.1.
Schema
Joi.object({ email: Joi.string().email({ tlds: { allow: ["com", "co.uk"] } } ) })
Data to validate
{ email: "test@example.co.uk", }
Result: Validation Error: "email" must be a valid email
I expected the email to be considered valid.
The text was updated successfully, but these errors were encountered:
“uk” is the tld, though I guess Joi could be extended to handle this kind of effective tld. At least it should fail when creating the schema.
Sorry, something went wrong.
I agree tlds should error on the invalid value. As for the actual requested feature, I'm not opposed but don't see it happening anytime soon.
tlds
b5426c3
hueniverse
No branches or pull requests
Support plan
Context
What are you trying to achieve or the steps to reproduce?
I am trying to validate a
.co.uk
email address using the email.tlds.allow option.I am testing using your joi Schema Tester v17.1.1.
Schema
Data to validate
What was the result you got?
Result:
Validation Error: "email" must be a valid email
What result did you expect?
I expected the email to be considered valid.
The text was updated successfully, but these errors were encountered: