1
0

first commit

This commit is contained in:
2020-08-06 14:58:51 +08:00
commit 17096657dc
780 changed files with 92857 additions and 0 deletions

View File

@@ -0,0 +1,47 @@
<?php
// +------------------------------------------------+
// |http://www.cjango.com |
// +------------------------------------------------+
// | 修复BUG不是一朝一夕的事情等我喝醉了再说吧 |
// +------------------------------------------------+
// | Author: 小陈叔叔 <Jason.Chen> |
// +------------------------------------------------+
namespace app\common\validate;
use think\Validate;
/**
* 菜单验证器
*/
class Menu extends Validate
{
/**
* 验证规则
* @var array
*/
protected $rule = [
'title' => 'require|max:32',
'sort' => 'number',
'url' => 'requireWith:pid|max:30',
];
/**
* 错误提示消息
* @var array
*/
protected $message = [
'title.require' => '菜单名称必须填写',
'title.max' => '菜单名称不应大于:rule字符',
'sort.number' => '排序必须是数字',
'url.requireWith' => '菜单URL连接必须填写',
'url.max' => '菜单URL最大长度:rule字符',
];
/**
* 验证场景
* @var array
*/
protected $scene = [
'add' => ['title', 'sort', 'url'],
];
}