chebur/validator-constraints

Some symfony validator constraints

1.3.0 2022-04-11 17:37 UTC

This package is not auto-updated.

Last update: 2024-12-17 07:03:23 UTC


README

PHP requirements Latest version Total downloads License

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