46 lines
807 B
PHP
46 lines
807 B
PHP
<?php
|
|
/**
|
|
* Created by PhpStorm.
|
|
* User: Administrator
|
|
* Date: 2020/4/23
|
|
* Time: 18:58
|
|
*/
|
|
|
|
namespace app\admin\validate\custom;
|
|
|
|
|
|
use think\Validate;
|
|
|
|
class Student extends Validate
|
|
{
|
|
/**
|
|
* 验证规则
|
|
* @var array
|
|
*/
|
|
protected $rule = [
|
|
'id' => 'require|number',
|
|
'reason' => 'require|max:200'
|
|
];
|
|
|
|
/**
|
|
* 错误提示
|
|
* @var array
|
|
*/
|
|
protected $message = [
|
|
'id.require' => '编号必须',
|
|
'id.number' => '编号为数字',
|
|
'reason.require' => '退款原因必须',
|
|
'reason.max' => '退款原因最多不能超过200个字符'
|
|
];
|
|
|
|
/**
|
|
* 应用场景
|
|
* @var array
|
|
*/
|
|
protected $scene = [
|
|
|
|
//授权
|
|
'refundOrder' => ['id','reason'],
|
|
|
|
];
|
|
} |