31 lines
580 B
PHP
31 lines
580 B
PHP
<?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']);
|
|
}
|
|
} |