-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Closed
Description
Context
- node version: any
- joi version: 15.1.1
- environment (node, browser): any
- used with (hapi, standalone, ...): hapi
- any other relevant information:
What are you trying to achieve or the steps to reproduce ?
Trying to validate email printifyapp.com_00000000000000000000000000000000000000000000000000@resource.calendar.google.com using Joi standard .email() and it reports that Email is not valid, while it looks legit and is produced by https://printify.com/.
const schema = Joi.object({
email: Joi.string().trim().email({tlds: false}).required(),
});
const { error } = Joi.validate({
email: 'printifyapp.com_00000000000000000000000000000000000000000000000000@resource.calendar.google.com',
}, schema);
assert.ok(!error, error);Which result you had ?
ValidationError: child "email" fails because ["email" must be a valid email]
What did you expect ?
No validation errors
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugBug or defectBug or defect