zzwy2/app/validate/HonourValidate.php

20 lines
465 B
PHP
Executable File

<?php
namespace app\validate;
use think\Validate;
class HonourValidate extends Validate
{
protected $rule = [
'title' => 'require|length:1,60',
'visible' => 'require|in:0,1',
'image' => 'require',
];
protected $message = [
'title.require' => '标题不能为空',
'image.require' => '图片不能为空',
'visible.require' => '状态必须设置',
'visible.in' => '状态参数错误',
];
}