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