cmbYouku_Api/app/validate/front/LoginValidate.php

31 lines
580 B
PHP
Raw Permalink Normal View History

2024-07-01 15:57:07 +08:00
<?php
declare (strict_types=1);
namespace app\validate\front;
use think\Validate;
/**
* @author canny
* @date 2023/11/29 15:59
**/
class LoginValidate extends Validate
{
protected $rule = [
'code' => 'require',
'phone' => 'require|mobile',
];
public function sceneSendSms(): Validate
{
return $this->only(['phone']);
}
public function sceneBindMobile(): Validate
{
return $this->only(['code','phone']);
}
public function sceneSendReleaseSms(): Validate
{
return $this->only(['phone']);
}
}