chebur / validator-constraints
Some symfony validator constraints
Installs: 11 950
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 2
Forks: 1
Open Issues: 0
Requires
- php: ^7.4 || ^8.0
- symfony/validator: ^4.4 || ^5.4
This package is not auto-updated.
Last update: 2024-11-19 06:44:52 UTC
README
Installation
composer require chebur/validator-constraints
List of constraints
OrComposite
Validation will be passed if at least one child constraint validation passed
(Since Symfony 5.1 there is AtLeastOneOf
constraint)
KeyExists
Looks into the value if the passed key exists in it.
AbstractConstraintList
Abstract composite constraint. Helpful to create any constraint combinations.
(Since Symfony 5.1 there is Compound
constraint)
BreakOnFailure
Composite constraint. Validation by child constraints will be stopped after first error.
(Since Symfony 5.1 there is Sequentially
constraint)
AllKey
Composite constraint. Similar to All
constraint, but this one validates array keys - not values.
AllUnique
Checks if passed array contains only unique values
IntInString
Checks if passed string contains only valid positive integer not more than PHP_INT_MAX