Im using Joi library as standalone validator for my CRA project but when firing email()
validator im getting cryptic error
Uncaught Error: Built-in TLD list disabled
From Joi documentation:
By default, the TLD must be a valid name listed on the IANA registry. To disable validation, set tlds to false. To customize how TLDs are validated, set one of these:
allow - one of:
To disable TLD validation against IANA accepted list:
email: Joi.string().email({ tlds: { allow: false } });
This should disable the validation and allow you to accept any TLD even if it's not IANA registered.