| 12345678910111213141516171819202122232425262728 |
- <?php
- namespace UCore\Validator;
- use App\Module\Ulogic\Services\UserAddressService;
- use UCore\Validator;
- class IsOnlineAddress extends Validator
- {
- /**
- * @param mixed $value
- * @param array $data
- * @return bool
- * 检测是否uraus地址
- */
- public function validate(mixed $value, array $data): bool
- {
- $sysStr = '0xuraus';
- $prefix = substr($data['to_address'], 0, 7); // 截取前 7 位
- if ($sysStr === $prefix) {
- return false;
- }
- return true;
- }
- }
|