Open simon-p-r opened 8 years ago
Why instead of using format lookup under county you don't put it directly on object and check that like this? It makes more sense to put format there since it relies on properties of the object. The thing you're proposing is not a good approach.
type: 'object',
properties: {
buildingNumber: {
type: 'string'
},
county: {
type: 'string'
}
},
required: ['buildingNumber', 'county'],
format: 'lookup',
additionalProperties: false
Hi @zaggino
I am wondering whether you would consider expose the parent object context in the custom format functions. For brevity a simple pseudo example
Schema
lookup format function
The lookup object used in function is something like this
Data that passes validation
Data that fails validation