first commit
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
/**
|
||||
* @copyright Copyright (c) 2023-2024 美天智能科技
|
||||
* @author 李志强
|
||||
* @link http://www.meteteme.com
|
||||
*/
|
||||
|
||||
namespace app\admin\validate;
|
||||
|
||||
use think\Validate;
|
||||
|
||||
class DepartmentCheck extends Validate
|
||||
{
|
||||
protected $rule = [
|
||||
'title' => 'require|unique:department',
|
||||
'id' => 'require',
|
||||
];
|
||||
|
||||
protected $message = [
|
||||
'title.require' => '部门名称不能为空',
|
||||
'title.unique' => '同样的部门名称已经存在',
|
||||
'id.require' => '缺少更新条件',
|
||||
];
|
||||
|
||||
protected $scene = [
|
||||
'add' => ['title'],
|
||||
'edit' => ['id', 'title'],
|
||||
];
|
||||
}
|
||||
Reference in New Issue
Block a user