29 lines
		
	
	
		
			606 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			29 lines
		
	
	
		
			606 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
| <?php
 | |
| /**
 | |
|  * @copyright Copyright (c) 2023-2024 美天智能科技
 | |
|  * @author 李志强
 | |
|  * @link http://www.meteteme.com
 | |
|  */
 | |
| 
 | |
| namespace app\admin\validate;
 | |
| 
 | |
| use think\Validate;
 | |
| 
 | |
| class TaskCateCheck extends Validate
 | |
| {
 | |
|     protected $rule = [
 | |
|         'title' => 'require|unique:task_cate',
 | |
|         'id' => 'require',
 | |
|     ];
 | |
| 
 | |
|     protected $message = [
 | |
|         'title.require' => '名称不能为空',
 | |
|         'title.unique' => '同样的名称已经存在',
 | |
|         'id.require' => '缺少更新条件',
 | |
|     ];
 | |
| 
 | |
|     protected $scene = [
 | |
|         'add' => ['title'],
 | |
|         'edit' => ['id', 'title'],
 | |
|     ];
 | |
| } |