first commit
This commit is contained in:
@@ -0,0 +1,46 @@
|
||||
<?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'],
|
||||
|
||||
];
|
||||
}
|
||||
Reference in New Issue
Block a user