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
I have an array of contacts:
var contacts = [{ type: 'email', value: 'x@x.x' }, { type: 'phone', value: '+8 9123 23213123' }]
Can you please give me an example of schema for this case?
The text was updated successfully, but these errors were encountered:
+1 to this. I need to validate that an object contains an array and this doesn't work for that use case at all.
Sorry, something went wrong.
I am not sure if revalidator can handle array as root item. But I know that the lib https://github.com/litixsoft/lx-valid can do it. Here is the schema:
const schema = { type: 'array', items: { type: 'object', properties: { type: { type: 'string' }, value: { type: 'string' } } } };
Was this ever solved for revalidator library?
No branches or pull requests
I have an array of contacts:
Can you please give me an example of schema for this case?
The text was updated successfully, but these errors were encountered: