structure and style updates
This commit is contained in:
@@ -11,13 +11,13 @@ class ValidIso3166CountryCode implements ValidationRule
|
||||
public function __construct(
|
||||
private readonly bool $activeOnly = true,
|
||||
private readonly string $format = 'alpha2',
|
||||
) {
|
||||
}
|
||||
) {}
|
||||
|
||||
public function validate(string $attribute, mixed $value, Closure $fail): void
|
||||
{
|
||||
if (! is_string($value) && ! is_int($value)) {
|
||||
$fail('The :attribute must be a valid ISO 3166 country code.');
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user