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);
ValidationError: child "email" fails because ["email" must be a valid email]
No validation errors
It's not valid according to https://tools.ietf.org/html/rfc5321#section-4.5.3.1.1 (67 > 64).
Use the ignoreLength email option. I forgot to expose it.
Most helpful comment
Use the
ignoreLengthemail option. I forgot to expose it.