Is there a way for Cerberus to confirm that two fields have the same number of elements?
For example, this document will check:
{'a': [1, 2, 3], b: [4, 5, 6]}
And it will not be:
{'a': [1, 2, 3], 'b': [7, 8]}
So far I have come up with this scheme:
{'a': {'required':False, 'type'= 'list', 'dependencies':'b'}, 'b': {'required':False, 'type'= 'list', 'dependencies':'a'}}
But there is no rule for checking the equal length of two fields.
source share