hydrakit / validation
Zero-dependency input validation: per-field rules, stateless, shareable.
Requires
- php: >=8.2
- ext-fileinfo: *
- psr/http-message: ^2.0
Requires (Dev)
- nyholm/psr7: ^1.8
- phpunit/phpunit: ^11.0
Suggests
None
Provides
None
Conflicts
None
Replaces
None
- dev-main / 0.24.x-dev
- v0.24.0
- v0.23.0
- v0.22.1
- v0.22.0
- v0.21.0
- v0.20.0
- v0.19.0
- v0.18.0
- v0.17.0
- v0.16.0
- v0.15.0
- v0.14.0
- v0.13.0
- v0.12.0
- v0.11.0
- v0.10.2
- v0.10.1
- v0.10.0
- v0.9.17
- v0.9.16
- v0.9.15
- v0.9.14
- v0.9.13
- v0.9.12
- v0.9.11
- v0.9.10
- v0.9.9
- v0.9.8
- v0.9.7
- v0.9.6
- v0.9.5
- v0.9.4
- v0.9.3
- v0.9.2
- v0.9.1
- v0.9.0
- v0.8.1
- v0.8.0
- v0.7.2
- v0.7.1
- v0.7.0
- v0.6.3
- v0.6.2
- v0.6.1
- v0.6.0
- v0.5.8
- v0.5.7
- v0.5.6
- v0.5.5
- v0.5.4
- v0.5.3
- v0.5.2
- v0.5.1
- v0.5.0
- v0.4.1
- v0.4.0
- v0.3.4
- v0.3.3
- v0.3.2
- v0.3.1
- v0.3.0
- v0.2.1
- v0.2.0
- v0.1.2
- v0.1.0
This package is auto-updated.
Last update: 2026-10-02 15:43:45 UTC
README
Part of the Hydra PHP framework. Documentation: hydra.williamhleucka.com/docs.
Read-only mirror.
hydrakit/validationis developed in hydra-foundation/hydra underpackages/validation, and republished here on every push. A commit pushed to this repository is overwritten by the next one; issues are disabled for that reason, and a pull request opened here cannot be merged. Both belong upstream.
Validates a set of input values against a per-field list of rules. Stateless.
The rules travel with each call, so one Validator can be shared and autowired.
Ships no ServiceProvider; the validator has no dependencies to bind.
Rule keys are dot paths, and * walks a list: items.*.qty runs its rules
once per entry and keys each error to items.0.qty. A rule is an object
implementing RuleInterface, handed the value and a Context holding the rest
of the input, which is how Confirmed, Same and the conditional Required*
rules see the field they compare against. Exists and Unique live in
hydrakit/database, which is where the connection is.