Open andreisaikouski opened 1 year ago
wouldn't be enough to create a union of 2 types (one with name required, and other with email required)?
@jakubwolny in my project we have larger interfaces which would require significant code duplication.
Currently I accomplished this with a refine
that then checks for one or the other, but would be easier like Joi.or()
Add a
one of
oror
type link in Joi.or()e.g. I want to validate that type
User
has at least one ofname
oremail