luck-draw/app/validate/MenuValidate.php

21 lines
497 B
PHP
Raw Permalink Normal View History

2022-02-22 09:27:27 +00:00
<?php
namespace app\validate;
use think\Validate;
class MenuValidate extends Validate
{
protected $rule = [
'pid|父级菜单' => 'require|number',
'title|标题' => 'require',
'id|ID' => 'require|number',
'field|字段名' => 'require',
'value|值' => 'require',
];
protected $scene = [
'menu_add_and_edit' => ['pid', 'title'],//菜单添加
'menu_modify' => ['id', 'field', 'value'],//单元格编辑
];
}