No description
  • PHP 99.1%
  • Shell 0.9%
Find a file
Henrique Moody d4605f4493
Add wildcard support to ResultQuery::findByPath()
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)
2026-02-08 22:43:06 +01:00
.github Update composer lifecycle 2026-02-06 19:20:10 +00:00
bin Enhance LintSpdxCommand with contributor tracking and header normalization 2026-02-03 15:23:20 +01:00
data Introduce REUSE compliance 2026-01-21 06:28:11 +00:00
docs Add wildcard support to ResultQuery::findByPath() 2026-02-08 22:43:06 +01:00
LICENSES Introduce REUSE compliance 2026-01-21 06:28:11 +00:00
src Add wildcard support to ResultQuery::findByPath() 2026-02-08 22:43:06 +01:00
src-dev Create "Formatted" validator 2026-02-06 20:44:26 +01:00
tests Add wildcard support to ResultQuery::findByPath() 2026-02-08 22:43:06 +01:00
.gitattributes Update .gitattributes 2026-02-03 16:22:40 +00:00
.gitignore Update composer lifecycle 2026-02-06 19:20:10 +00:00
.readthedocs.yaml Improve syntax highlighting in MkDocs pages 2026-01-05 17:54:43 +01:00
aliases.php Add v::format() to check if data is already in a specific format 2026-02-05 16:19:11 +00:00
codecov.yml Use Pest instead of PHPT files 2024-12-16 17:07:47 +01:00
composer.json Improve Documentation 2026-02-01 22:46:48 +00:00
composer.lock Update composer lifecycle 2026-02-06 19:20:10 +00:00
CONTRIBUTING.md Improve Documentation 2026-02-01 22:46:48 +00:00
LICENSE Introduce REUSE compliance 2026-01-21 06:28:11 +00:00
mkdocs.yml Use awesome-pages to customize the menus 2026-01-26 12:26:06 +01:00
phpbench.json.dist Remove mathematical, niche and deprecated validators 2026-01-30 16:08:27 +00:00
phpcs.xml.dist Remove mathematical, niche and deprecated validators 2026-01-30 16:08:27 +00:00
phpstan.neon.dist Create ShortCircuit validator and ShortCircuitable interface 2026-02-05 17:32:42 +01:00
phpunit.xml.dist Remove mathematical, niche and deprecated validators 2026-01-30 16:08:27 +00:00
README.md Update README.md and README.md-linked headline docs 2026-02-01 22:46:02 +00:00
REUSE.toml Update composer lifecycle 2026-02-06 19:20:10 +00:00

Respect\Validation

Build Status Code Coverage Latest Stable Version Total Downloads License

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: