We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Thanks for your great library!
I am wondering if it would be possible to define conditional validation rules in a json schema, since I used this feature a lot with Joi.
Taken from their examples page:
const schema = { a: Joi.valid('a', 'b', 'other'), other: Joi.string() .when('a', { is: 'other', then: Joi.required() }), };
Can such conditional validation rules be expressed via a static schema with enjoi?
Thanks!
The text was updated successfully, but these errors were encountered:
You should be able to do this with custom types.
Sorry, something went wrong.
@tlivings could you please give me a short code example how to accomplish this by using custom types with enjoi? thanks a lot!
No branches or pull requests
Thanks for your great library!
I am wondering if it would be possible to define conditional validation rules in a json schema, since I used this feature a lot with Joi.
Taken from their examples page:
Can such conditional validation rules be expressed via a static schema with enjoi?
Thanks!
The text was updated successfully, but these errors were encountered: