firebase-alchemy
firebase-alchemy copied to clipboard
Update to more advanced validators
right now validator can proform simple check on if the passing payload has certain keys, and if the types of keys fit. The validator should do more than that, it should be isolated to a class (or a new repo? i got excited!) and allow to pass an instance of class in abstract model manager. The validator should be able to do the following:
- match more, less, or exactly the keys
- allow passing predefined function as validator
- allow advanced validator, like check if it is url
- allow extend validation schema (check out eve validation schema)
- multiple depth validation, allow check types / content down more than one level
This topic should be well investigated before proceed, including structure design and utilize python packages that already exist. Some good examples here:
- Learn from wtforms.validator
- Learn from eve validation schema
- Learn from existed python packages like validatorpy