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

Joi.string().email returning an error on unicode email addresses #1096

Closed
Zambonilli opened this issue Feb 2, 2017 · 2 comments
Closed

Joi.string().email returning an error on unicode email addresses #1096

Zambonilli opened this issue Feb 2, 2017 · 2 comments
Assignees
Labels
feature New functionality or improvement

Comments

@Zambonilli
Copy link

Context

  • node version: 4.4.7
  • joi version:10.2.1 & 7.0.0
  • environment (node, browser): node
  • used with (hapi, standalone, ...): standalone
  • any other relevant information:

What are you trying to achieve or the steps to reproduce ?

I'd like to achieve using Joi's string email method to validate international email addresses. Currently an error is returned on international email addresses.

Describe your issue here, include schemas and inputs you are validating if needed.
Valid international emails, via wikipedia, are failing the Joi string email validator.

const Joi = require('joi');
console.log(JSON.stringify(Joi.validate('Dörte@Sörensen.example.com', Joi.string().email())));

Which result you had ?

{"error":{"isJoi":true,"name":"ValidationError","details":[{"message":""value" must be a valid email","path":"value","type":"string.email","context":{"value":"Dörte@Sörensen.example.com","key":"value"}}],"_object":"Dörte@Sörensen.example.com"},"value":"Dörte@Sörensen.example.com"}

What did you expect ?

No error in the response.

@Marsup Marsup self-assigned this Feb 2, 2017
@Marsup
Copy link
Collaborator

Marsup commented Feb 2, 2017

Duplicate of #931, you're welcome to contribute on isemail if you know this stuff.

@Marsup Marsup closed this as completed Feb 2, 2017
@Zambonilli
Copy link
Author

thanks for the quick reply.

@hueniverse hueniverse added feature New functionality or improvement and removed request labels Sep 19, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Mar 17, 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