structure and style updates

This commit is contained in:
Mark Gregory
2026-06-16 23:21:49 +01:00
parent 80991208af
commit 2c2af4c50e
60 changed files with 209 additions and 216 deletions
@@ -8,14 +8,13 @@ use Modules\Countries\Models\CountrySubdivision;
class ValidIso3166SubdivisionCode implements ValidationRule
{
public function __construct(private readonly bool $activeOnly = true)
{
}
public function __construct(private readonly bool $activeOnly = true) {}
public function validate(string $attribute, mixed $value, Closure $fail): void
{
if (! is_string($value) || ! preg_match('/^[A-Z]{2}-[A-Z0-9]{1,6}$/', strtoupper($value))) {
$fail('The :attribute must be a valid ISO 3166-2 subdivision code.');
return;
}