chaoyu/app/validate/Category.php

18 lines
448 B
PHP
Executable File

<?php
namespace app\validate;
use think\Validate;
class Category extends Validate
{
protected $rule = [
'title' => 'require',
'model_id' => 'require|number|min:1',
];
protected $message = [
'title.require' => '栏目名称必须',
'model_id.require' => '栏目模型必须',
'model_id.number' => '栏目模型格式要正确',
'model_id.min' => '请选择正确的栏目模型'
];
}