Skip to content
This repository was archived by the owner on Mar 13, 2025. It is now read-only.

Commit 0aec7ad

Browse files
committed
chore: do not repeat value name on constraint assertions
1 parent 19ddb26 commit 0aec7ad

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/Rule/AtLeastOneOf.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public function assert(mixed $value, ?string $name = null): void
3535

3636
foreach ($this->constraints as $key => $constraint) {
3737
try {
38-
$constraint->assert($value, $name);
38+
$constraint->assert($value);
3939
return;
4040
}
4141
catch (ValidationException|UnexpectedValueException $exception) {

tests/AtLeastOneOfTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ public static function provideRuleMessageOptionData(): \Generator
6767
message: '{{ name }} | {{ value }} | {{ messages }}'
6868
),
6969
'string',
70-
'test | "string" | [1] The test value should be blank, "string" given.'
70+
'test | "string" | [1] The value should be blank, "string" given.'
7171
];
7272
}
7373
}

0 commit comments

Comments
 (0)