1.修改电话号码格式为60前缀,马来西亚格式
2.优化渠道可以查看分红方式,可以查看游玩详情
This commit is contained in:
@@ -4,6 +4,7 @@ declare(strict_types=1);
|
||||
|
||||
namespace support\bootstrap;
|
||||
|
||||
use app\common\library\MalaysiaMobilePhone;
|
||||
use think\Validate;
|
||||
use support\think\Db;
|
||||
use Workerman\Worker;
|
||||
@@ -17,6 +18,9 @@ class ValidateInit implements \Webman\Bootstrap
|
||||
{
|
||||
Validate::maker(function (Validate $validate): void {
|
||||
$validate->setDb(Db::connect());
|
||||
$validate->extend('mobile', static function ($value): bool {
|
||||
return MalaysiaMobilePhone::isValid((string) $value);
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user