Open Diokuz opened 9 years ago
+1 to this. I need to validate that an object contains an array and this doesn't work for that use case at all.
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?
I have an array of contacts:
Can you please give me an example of schema for this case?