diff --git a/src/Symfony/Component/Validator/Constraints/AtLeastOneOf.php b/src/Symfony/Component/Validator/Constraints/AtLeastOneOf.php index b7efac17b8864..ca726ae369102 100644 --- a/src/Symfony/Component/Validator/Constraints/AtLeastOneOf.php +++ b/src/Symfony/Component/Validator/Constraints/AtLeastOneOf.php @@ -19,10 +19,10 @@ */ class AtLeastOneOf extends Composite { - public const AT_LEAST_ONE_ERROR = 'f27e6d6c-261a-4056-b391-6673a623531c'; + public const AT_LEAST_ONE_OF_ERROR = 'f27e6d6c-261a-4056-b391-6673a623531c'; protected static $errorNames = [ - self::AT_LEAST_ONE_ERROR => 'AT_LEAST_ONE_ERROR', + self::AT_LEAST_ONE_OF_ERROR => 'AT_LEAST_ONE_OF_ERROR', ]; public $constraints = []; diff --git a/src/Symfony/Component/Validator/Constraints/AtLeastOneOfValidator.php b/src/Symfony/Component/Validator/Constraints/AtLeastOneOfValidator.php index 9085b89edb786..acdd31117af84 100644 --- a/src/Symfony/Component/Validator/Constraints/AtLeastOneOfValidator.php +++ b/src/Symfony/Component/Validator/Constraints/AtLeastOneOfValidator.php @@ -54,7 +54,7 @@ public function validate($value, Constraint $constraint) } $this->context->buildViolation(implode('', $messages)) - ->setCode(AtLeastOneOf::AT_LEAST_ONE_ERROR) + ->setCode(AtLeastOneOf::AT_LEAST_ONE_OF_ERROR) ->addViolation() ; } diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.en.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.en.xlf index 8f8d2d0a0fe98..674ccf5c30ea6 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.en.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.en.xlf @@ -374,6 +374,14 @@ The number of elements in this collection should be a multiple of {{ compared_value }}. The number of elements in this collection should be a multiple of {{ compared_value }}. + + This value should satisfy at least one of the following constraints: + This value should satisfy at least one of the following constraints: + + + Each element of this collection should satisfy its own set of constraints. + Each element of this collection should satisfy its own set of constraints. + diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.es.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.es.xlf index 24ef5548da44d..57b07b2b5546a 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.es.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.es.xlf @@ -374,6 +374,14 @@ The number of elements in this collection should be a multiple of {{ compared_value }}. El número de elementos en esta colección debería ser múltiplo de {{ compared_value }}. + + This value should satisfy at least one of the following constraints: + Este valor debería satisfacer al menos una de las siguientes restricciones: + + + Each element of this collection should satisfy its own set of constraints. + Cada elemento de esta colección debería satisfacer su propio conjunto de restricciones. + diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.pl.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.pl.xlf index df93abd0b9ee6..afd3f73263c7b 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.pl.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.pl.xlf @@ -374,6 +374,14 @@ The number of elements in this collection should be a multiple of {{ compared_value }}. Liczba elementów w tym zbiorze powinna być wielokrotnością {{ compared_value }}. + + This value should satisfy at least one of the following constraints: + Ta wartość powinna spełniać co najmniej jedną z następujących reguł: + + + Each element of this collection should satisfy its own set of constraints. + Każdy element w tym zbiorze powinien spełniać własny zestaw reguł. + diff --git a/src/Symfony/Component/Validator/Tests/Constraints/AtLeastOneOfValidatorTest.php b/src/Symfony/Component/Validator/Tests/Constraints/AtLeastOneOfValidatorTest.php index fff5d1015a122..2870781780117 100644 --- a/src/Symfony/Component/Validator/Tests/Constraints/AtLeastOneOfValidatorTest.php +++ b/src/Symfony/Component/Validator/Tests/Constraints/AtLeastOneOfValidatorTest.php @@ -106,7 +106,7 @@ public function testInvalidCombinationsWithDefaultMessage($value, $constraints) $this->validator->validate($value, $atLeastOneOf); - $this->buildViolation(implode('', $message))->setCode(AtLeastOneOf::AT_LEAST_ONE_ERROR)->assertRaised(); + $this->buildViolation(implode('', $message))->setCode(AtLeastOneOf::AT_LEAST_ONE_OF_ERROR)->assertRaised(); } /** @@ -124,7 +124,7 @@ public function testInvalidCombinationsWithCustomMessage($value, $constraints) $this->validator->validate($value, $atLeastOneOf); - $this->buildViolation('foo')->setCode(AtLeastOneOf::AT_LEAST_ONE_ERROR)->assertRaised(); + $this->buildViolation('foo')->setCode(AtLeastOneOf::AT_LEAST_ONE_OF_ERROR)->assertRaised(); } public function getInvalidCombinations()