You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
ymww_backend/addons/shopro/validate/third/Wechat.php

28 lines
563 B

<?php
namespace addons\shopro\validate\third;
use think\Validate;
class Wechat extends Validate
{
protected $regex = [
'mobile' => '/^1[3456789]\d{9}$/',
];
protected $rule = [
'mobile' => 'require|regex:mobile|unique:user'
];
protected $message = [
'mobile.require' => '手机号必须填写',
'mobile.regex' => '手机号格式不正确',
'mobile.unique' => '手机号已被占用',
];
protected $scene = [
'bindWechatMiniProgramMobile' => ['mobile']
];
}