Skip to content

Commit c44031f

Browse files
authored
Merge pull request #11 from samsonasik/fix-constant
Fix validator constant no letter use for consistency
2 parents adcfe64 + 83ae233 commit c44031f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Validator/Naming.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ final class Naming extends AbstractValidator
1919
/**
2020
* @var string
2121
*/
22-
private const MUST_CONTAIN_LETTER = 'MUST_CONTAIN_LETTER';
22+
private const NO_LETTER = 'NO_LETTER';
2323

2424
/**
2525
* @var string
@@ -63,7 +63,7 @@ final class Naming extends AbstractValidator
6363

6464
/** @var array<string, string> */
6565
protected array $messageTemplates = [
66-
self::MUST_CONTAIN_LETTER => 'Name must contain at least one letter',
66+
self::NO_LETTER => 'Names must contain at least one letter',
6767
self::SPECIAL_OR_NUMBER => 'Names can contain only letters, hyphens, apostrophe, spaces & full stops',
6868
self::SINGLE_DOT => 'Single "." character is not allowed',
6969
self::SINGLE_HYPHEN => 'Single "-" character is not allowed',
@@ -123,7 +123,7 @@ public function isValid(mixed $value): bool
123123
}
124124

125125
if (! preg_match('#\p{L}#u', $value)) {
126-
$this->error(self::MUST_CONTAIN_LETTER);
126+
$this->error(self::NO_LETTER);
127127
return false;
128128
}
129129

0 commit comments

Comments
 (0)