mirror of
https://github.com/Respect/Validation.git
synced 2026-03-14 22:35:45 +01:00
No description
- PHP 99.1%
- Shell 0.9%
Before this change, querying validation results required knowing the exact path to a specific result node—including numeric indices for array elements (e.g., `items.1.email`). This made it impractical to locate the first failing result in dynamic collections where the failing index is not known ahead of time. Wildcard segments (`*`) allow matching any single path component, so patterns like `items.*`, `*.email`, or `data.*.value` will traverse the result tree and return the first node whose path matches. This is particularly valuable when validating arrays of items with `each()`, because consumers can now ask "give me the first failure under items" without iterating manually. The implementation replaces the previous flat `array_find` lookup with a recursive depth-first traversal that, when a wildcard is present, compares each node's full path against the pattern using segment-level matching. Non-wildcard lookups continue to use exact array equality, so there is no behavioral change for existing callers. Assisted-by: Claude Code (claude-opus-4-6) |
||
|---|---|---|
| .github | ||
| bin | ||
| data | ||
| docs | ||
| LICENSES | ||
| src | ||
| src-dev | ||
| tests | ||
| .gitattributes | ||
| .gitignore | ||
| .readthedocs.yaml | ||
| aliases.php | ||
| codecov.yml | ||
| composer.json | ||
| composer.lock | ||
| CONTRIBUTING.md | ||
| LICENSE | ||
| mkdocs.yml | ||
| phpbench.json.dist | ||
| phpcs.xml.dist | ||
| phpstan.neon.dist | ||
| phpunit.xml.dist | ||
| README.md | ||
| REUSE.toml | ||
Respect\Validation
The most awesome validation engine ever created for PHP.
- Complex validation made simple:
v::numericVal()->positive()->between(1, 255)->isValid($input). - Advanced exception handling.
- More than 150 (fully tested) validators.
Learn More: