Repo rebuild
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
<?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