mirror of
https://github.com/Respect/Validation.git
synced 2024-06-08 16:52:16 +02:00
ab602ae1bb
The constructor of "Factory" has three arguments and, even though none of them are needed, they are all required. Those arguments allow users to customize the namespaces of rules and exceptions, and also to define a callable that will translate the template messages. This commit will remove those parameters from the constructor of "Factory," and create methods that will allow users to customize the namespaces and the translator. The methods that this commit will create will not change the state of "Factory," but they will create a clone with the customizations. It is imperative that the "Factory" is immutable. Since the "Factory" is a Singleton, allowing it to change could cause unexpected behaviors. Signed-off-by: Henrique Moody <henriquemoody@gmail.com> |
||
---|---|---|
data/iso_3166-2 | ||
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 150 (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.