mirror of
https://github.com/Respect/Validation.git
synced 2024-06-13 19:22:16 +02:00
d36572cc25
Currently, the Property rule has a third parameter that allows the validation of the wrapped rule to be optional, meaning that the validation will only happen if the property exists. That parameter makes the rule harder to understand at times. I'm splitting the Property rule into Property, PropertyExists, and PropertyOptional. That way, it becomes apparent when someone wants only to validate whether a property exists or if they will validate the value of the property only when it exists. I deliberately didn't create an abstract class because those rules are different enough not to have an abstraction. In fact, I can see myself deleting the AbstractRelated after I refactor the KeyNested rule. Signed-off-by: Henrique Moody <henriquemoody@gmail.com> |
||
---|---|---|
.github | ||
bin | ||
data/domain/public-suffix | ||
docs | ||
library | ||
tests | ||
.docheader | ||
.gitattributes | ||
.gitignore | ||
.readthedocs.yaml | ||
CHANGELOG.md | ||
composer.json | ||
CONTRIBUTING.md | ||
LICENSE | ||
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.
Learn More: