-
Notifications
You must be signed in to change notification settings - Fork 80
Open
Description
I want to validate a schema to catch incorrect keys while keeping them optional. I've looked through the options, but I'm not sure if this is possible.
Here's a small portion of my schema for accessibility checks, I want to validate the key incomplete while keeping it optional:
messages: {
required: true,
type: 'object',
properties: {
fail: {
required: true,
type: 'string'
},
pass: {
required: true,
type: 'string'
},
incomplete: {
type: ['string', 'object']
}
}
}
The only thing I've gotten revalidator to complain about is if I make incomplete required. The motivation for this change is I want to prevent check authors from using undefined: {} instead of incomplete: {}, where only some checks will have incomplete messages specified (hence the optional bit).
Metadata
Metadata
Assignees
Labels
No labels