48 lines
775 B
PHP
48 lines
775 B
PHP
<?php
|
|
|
|
namespace app\api\validate;
|
|
use app\common\validate\BaseValidate;
|
|
|
|
|
|
/**
|
|
* 订单验证器
|
|
* Class OrderValidate
|
|
* @package app\admin\validate\order
|
|
*/
|
|
class OrderValidate extends BaseValidate
|
|
{
|
|
|
|
/**
|
|
* 设置校验规则
|
|
* @var string[]
|
|
*/
|
|
protected $rule = [
|
|
'order_id' => 'require|number',
|
|
'verify_code' => 'require',
|
|
];
|
|
|
|
|
|
/**
|
|
* 参数描述
|
|
* @var string[]
|
|
*/
|
|
protected $field = [
|
|
'order_id' => '订单',
|
|
'verify_code' => '验证码',
|
|
];
|
|
|
|
|
|
/**
|
|
* @notes 添加场景
|
|
* @return OrderValidate
|
|
* @author likeadmin
|
|
* @date 2024/04/24 10:37
|
|
*/
|
|
public function sceneCheck()
|
|
{
|
|
return $this->only(['order_id','verify_code']);
|
|
}
|
|
|
|
|
|
|
|
} |