Overview
Python version of "the most awesome validation engine for PHP"
Installation
--> DEMO
General information
PHP and Python have many differences that why this library has some small changes, but an awesome architecture was migrated without changes.
- Complex rules made simple:
v.numericVal().positive().between(1, 255).validate(some_variable)
. - PEP8
snake_case
supported:v.one_of(v.string_val().string_type(), v.int_val().int_type()).validate("gurkin33")
- Advanced reporting to show validation errors.
- More than 130 (fully tested) validation rules.
- Integration with Flask example.
- Please see demo of integration with flask.
- Easy translation with multi-language support.
Why is it great alternative to others?
- It is easy to make logical check in one line. You can easily see logic in chain of rules. There are no addition classes, instances, dictionaries, there is only one chain of rules and it is beautiful.
- There are logical operators inside, you can use them as usual rules.
You can easily set several validation chains and wrap them into
logical rule like
AnyOf
orOneOf
(only one chain valid) orAllOf
orWhen
(if ... then ... else) and so on. I hope you will find this interesting. - Any rule or chain of rules you can easily revert to negative result
with only one logical rule -
Not
. - There are many of prebuilt rules. They will be useful for most of general cases.
- You can easily create you own package of rules and use it when it is needed.
How to say thank you?
If you like this library please add star for initial library "the most awesome validation engine for PHP".
Many thanks to Alexandre Gomes Gaigalas for beautiful architecture.