<?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'],//单元格编辑
    ];
}