Skip to content

Commit 7b9f7fe

Browse files
committed
change default Week constraint messages
1 parent fa91b88 commit 7b9f7fe

File tree

1 file changed

+5
-5
lines changed
  • src/Symfony/Component/Validator/Constraints

1 file changed

+5
-5
lines changed

src/Symfony/Component/Validator/Constraints/Week.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@ public function __construct(
3838
public ?string $min = null,
3939
public ?string $max = null,
4040
public string $invalidFormatMessage = 'This value does not represent a valid week in the ISO 8601 format.',
41-
public string $invalidWeekNumberMessage = 'The week "{{ value }}" is not a valid week.',
42-
public string $tooLowMessage = 'The value should not be before week "{{ min }}".',
43-
public string $tooHighMessage = 'The value should not be after week "{{ max }}".',
41+
public string $invalidWeekNumberMessage = 'This value is not a valid week.',
42+
public string $tooLowMessage = 'This value should not be before week "{{ min }}".',
43+
public string $tooHighMessage = 'This value should not be after week "{{ max }}".',
4444
?array $groups = null,
4545
mixed $payload = null,
4646
) {
@@ -55,8 +55,8 @@ public function __construct(
5555
}
5656

5757
if (null !== $min && null !== $max) {
58-
[$minYear, $minWeekNumber] = \explode('-W', $min, 2);
59-
[$maxYear, $maxWeekNumber] = \explode('-W', $max, 2);
58+
[$minYear, $minWeekNumber] = explode('-W', $min, 2);
59+
[$maxYear, $maxWeekNumber] = explode('-W', $max, 2);
6060

6161
if ($minYear > $maxYear || ($minYear === $maxYear && $minWeekNumber > $maxWeekNumber)) {
6262
throw new ConstraintDefinitionException(\sprintf('The "%s" constraint requires the min week to be less than or equal to the max week.', __CLASS__));

0 commit comments

Comments
 (0)