// +---------------------------------------------------------------------- namespace app\outapi\validate; use think\Validate; class LoginValidate extends Validate { protected $regex = ['account' => '/^[a-zA-Z0-9]{4,30}$/']; /** * @var string[] */ protected $rule = [ 'appid' => 'require|account', 'appsecret' => 'require', ]; /** * @var string[] */ protected $message = [ 'appid.require' => 400133, 'appid.account' => 400140, 'appsecret.regex' => 400134, ]; }