Commit 5e278877 authored by zhuwei's avatar zhuwei

验证器-搬迁

parent 8e946569
<?php
namespace app\index\validate;
use think\Validate;
class ImageDepot extends Validate {
protected $rule = [
'img_type' => 'require',
'img_name' => 'require',
'id' => 'require|number|gt:0'
];
protected $message = [
'img_type.require' => '图片类型不能为空',
'img_name.require' => '图片名不能为空',
'id.require' => 'id为必填字段',
'id.number' => 'id只能为数字',
'id.gt' => 'id必须大于0',
];
protected $scene = [
'addImageDepot' => [ 'img_type', 'img_name' ],
'getImageDepotById' => [ 'id' ],
];
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment