// +---------------------------------------------------------------------- namespace app\validate\admin; use think\Validate; class StoreCategoryValidate extends Validate { protected $failException = true; protected $rule = [ 'pid|上级分类' => 'require|integer', 'cate_name|分类名称' => 'require|max:12', 'is_show|状态' => 'require|in:0,1', 'pic|分类图标' => 'max:128', 'sort|排序' => 'require|integer' ]; }