respect_validation
Python version of "the most awesome validation engine for PHP"
Documentation
Installation
pip install respect-validation
--> DEMO
PHP and Python have many differences that why this library has some small changes, but an awesome architecture was migrated without changes.
General description:
- Complex rules made simple:
v.numericVal().positive().between(1, 255).validate(some_variable). - PEP8
snake_casesupported: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
AnyOforOneOf(only one chain valid) orAllOforWhen(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.
Release files for respect-validation 1.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| respect_validation-1.3.0.tar.gz | 48.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| respect_validation-1.3.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 187.3 kB
Release files / respect_validation-1.3.0.tar.gz
| Download URL | respect_validation-1.3.0.tar.gz |
|---|---|
| Size | 48.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
17dd9b6171c06efa78b5015dc280469ef3c198853c7b11382e9a22d1ff5312d4
|
|
BLAKE2b-256 checksum How to use checksums |
2b641a8062126da0440190aa7ce753c0ce64769cbe595d2184aaab9e86e7597f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.0 CPython/3.7.3rc1
|
Release files / respect_validation-1.3.0-py3-none-any.whl
| Download URL | respect_validation-1.3.0-py3-none-any.whl |
|---|---|
| Size | 139.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
12039ad1fdee37314af93e119bc368094ce2bdf8ea6f65eb14ffcf7e68efe185
|
|
BLAKE2b-256 checksum How to use checksums |
c727bf3f6c7a8962e8f7498125071c71c71efb3004bfd7ed3e8d7a9acdff97a9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.0 CPython/3.7.3rc1
|