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
OneOf()
It would be cool to have an assert that validates if at least one of its child nodes is present. For example:
validate({ phone: new Assert().OneOf({ main: [new Assert().IsString(), new Assert().Length({ max: 50 })], mobile: [new Assert().IsString(), new Assert().Length({ max: 48 })] }) });
This would make sure that at least a main or an object nodes were given.
main
object
The text was updated successfully, but these errors were encountered:
Is this still relevant? Does it solve any particular problem we're facing?
Sorry, something went wrong.
No branches or pull requests
It would be cool to have an assert that validates if at least one of its child nodes is present. For example:
This would make sure that at least a
main
or anobject
nodes were given.The text was updated successfully, but these errors were encountered: