added countries support expanded for ISO 3166 standard
This commit is contained in:
@@ -1,18 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Countries\Rules;
|
||||
|
||||
use Closure;
|
||||
use Illuminate\Contracts\Validation\ValidationRule;
|
||||
|
||||
class ValidCountryCode implements ValidationRule
|
||||
{
|
||||
public function __construct(private readonly bool $activeOnly = true)
|
||||
{
|
||||
}
|
||||
|
||||
public function validate(string $attribute, mixed $value, Closure $fail): void
|
||||
{
|
||||
(new ValidIso3166CountryCode($this->activeOnly, 'alpha2'))->validate($attribute, $value, $fail);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user