Does Cerberus 1.2
support dependency validation on a list?
For instance the schema looks as follows:
schema = {
'list_1': {
'type': 'list',
'schema': {
'type': 'dict',
'schema': {
'simple_field': {'type': 'boolean'},
'not_simple_field': {
'type': 'dict',
'schema': {
'my_field': {'dependencies': {'simple_field': True}}
}
}
}
}
}
}
The rule that I'd like to check is that my_field
should only exist when simple_field
is True. How would I translate that in Cerberus
?