| 1234567891011121314151617181920212223242526 |
- <?php
- namespace App\Module\User\Validator;
- use App\Module\User\Services\UserService;
- use UCore\Validator;
- /**
- * 用户ID是否存在,存在true
- *
- *
- */
- class UserIdExsit extends Validator
- {
- public function validate(mixed $value, array $data): bool
- {
- $info = UserService::info($value);
- if ($info) {
- return true;
- }
- return false;
- }
- }
|