Skip to content

Overview

Python version of "the most awesome validation engine for PHP"

Installation

pip install respect-validation

--> 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.

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 or OneOf (only one chain valid) or AllOf or When (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.