Python version of "the most awesome validation engine for PHP"
Project description
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.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file respect_validation-1.3.0.tar.gz.
File metadata
- Download URL: respect_validation-1.3.0.tar.gz
- Upload date:
- Size: 48.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.7.3rc1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
17dd9b6171c06efa78b5015dc280469ef3c198853c7b11382e9a22d1ff5312d4
|
|
| MD5 |
a2b38f5b4c6077c389f797fea3d32c27
|
|
| BLAKE2b-256 |
2b641a8062126da0440190aa7ce753c0ce64769cbe595d2184aaab9e86e7597f
|
File details
Details for the file respect_validation-1.3.0-py3-none-any.whl.
File metadata
- Download URL: respect_validation-1.3.0-py3-none-any.whl
- Upload date:
- Size: 139.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.7.3rc1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
12039ad1fdee37314af93e119bc368094ce2bdf8ea6f65eb14ffcf7e68efe185
|
|
| MD5 |
a306c90934421fc3c7de9af45a45e46c
|
|
| BLAKE2b-256 |
c727bf3f6c7a8962e8f7498125071c71c71efb3004bfd7ed3e8d7a9acdff97a9
|