-
Install from Pypi:
$ pip install moveax-validation --- or --- $ poetry add moveax-validation
-
Simple example:
>>> from validation import ValidatorFactory >>> data = ['foo', 'bar'] >>> schema = { 'elements': { 'rules': ['minlen:3'] 'type': 'string' }, 'rules': ['maxlen:3'], 'type': 'array' } >>> validator = ValidatorFactory.make(schema) >>> validator.validate(data)
-
Run the test suite with:
$ poetry run coverage run unit.py