Language Independent Validation Rules (v2.0)
Validator meets the following requirements:
- Rules are declarative and language independent
- Any number of rules for each field
- Validator should return together errors for all fields
- Exclude all fields that do not have validation rules described
- Possibility to validate complex hierarchical structures
- Easy to describe and understand validation
- Returns understandable error codes (neither error messages nor numeric codes)
- Easy to implement own rules (usually you will have several in every project)
- Rules should be able to change results output ("trim", "nested_object", for example)
- Multipurpose (user input validation, configs validation, contracts programming etc)
- Unicode support
Try online
Existing implemenations
- JavaScript (LIVR 2.0) available at npm, maintainer @koorchik
- Perl (LIVR 2.0) available at CPAN, maintainer @koorchik
- PHP (LIVR 2.0) available at packagist, maintainer @WebbyLab
- Python (LIVR 2.0) available at pypi, maintainer @asholok
- Erlang, Olifer (LIVR 2.0), maintainer @Prots
- Erlang, Liver (LIVR 2.0), maintainer @erlangbureau
- Java (LIVR 2.0), maintainer @vlbaluk
- Ruby (LIVR 2.0) available at rubygems, maintainer @fuksito
- Ruby (LIVR 0.4, previous version) at rubygems, maintainer @maktwin
- Lua (LIVR 2.0), maintainer @fperrad
- Go (LIVR 2.0), maintainer @k33nice
- Swift (LIVR 2.0), maintainer @grupozap
Latest LIVR version is 2.0
Previous LIVR version is 0.4
Documentation
Examples