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

Commit 9f4ec8f

Browse files
committed
chore: changed Country error message
1 parent b82e065 commit 9f4ec8f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/Rule/Country.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class Country extends AbstractRule implements RuleInterface
1818

1919
public function __construct(
2020
private readonly string $code = self::ALPHA2_CODE,
21-
private readonly string $message = 'The "{{ name }}" value is not a valid "{{ code }}" country code, "{{ value }}" given.'
21+
private readonly string $message = 'The "{{ name }}" value is not a valid country code, "{{ value }}" given.'
2222
) {}
2323

2424
public function assert(mixed $value, string $name): void

tests/CountryTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public static function provideRuleUnexpectedValueData(): \Generator
2828
public static function provideRuleFailureConditionData(): \Generator
2929
{
3030
$exception = CountryException::class;
31-
$message = '/The "(.*)" value is not a valid "(.*)" country code, "(.*)" given./';
31+
$message = '/The "(.*)" value is not a valid country code, "(.*)" given./';
3232

3333
yield 'default' => [new Country(), 'PRT', $exception, $message];
3434
yield 'alpha2' => [new Country(code: 'alpha2'), 'PRT', $exception, $message];

0 commit comments

Comments
 (0)