mirror of
https://github.com/Respect/Validation.git
synced 2024-06-08 08:42:15 +02:00
1f6c821fb6
The sorted rule accepts a callback on its constructor that may be used to filter values from inside the input. However, with the "Call" rule one can archive almost the same result. Besides that particular characteristic, its constructor accepts a boolean value to determine whether the sorting is ascending or descending. This commit will remove the callback from the constructor and replace the boolean by a string which can be "ASC" or "DESC." Along with those changes, this change will make a few more improvements: - Make the exception message specific about the sorting direction; - Allow the rule to validate also strings; - Update documentation. Co-authored-by: Danilo Correa <danilosilva87@gmail.com> Signed-off-by: Henrique Moody <henriquemoody@gmail.com> |
||
---|---|---|
docs | ||
library | ||
tests | ||
.docheader | ||
.gitattributes | ||
.gitignore | ||
.php_cs | ||
.scrutinizer.yml | ||
.travis.yml | ||
CHANGELOG.md | ||
composer.json | ||
CONTRIBUTING.md | ||
couscous.yml | ||
LICENSE.md | ||
mkdocs.yml | ||
phpcs.xml.dist | ||
phpstan.neon.dist | ||
phpunit.xml.dist | ||
README.md |
Respect\Validation
The most awesome validation engine ever created for PHP.
- Complex rules made simple:
v::numericVal()->positive()->between(1, 255)->validate($input)
. - Granularity control for advanced reporting.
- More than 130 (fully tested) validation rules.
- A concrete API for non fluent usage.
Documentation
Documentation can be found in https://respect-validation.readthedocs.io and also in the docs/ folder.