| 123456789101112131415161718192021222324252627282930 | 
							- <?php
 
- namespace app\common\validate;
 
- use think\Validate;
 
- class QualityGroup extends Validate{
 
-     protected $rule = [
 
-         'title|名称'  =>  'require|length:1,200',
 
-         'forms|检查项'  =>  'require',
 
-         'type'  =>  'egt:0|checkType',
 
-     ];
 
-     protected $message = [
 
-         'title.length' => '名称必须200字以内',
 
-     ];
 
-     protected $scene = [
 
-     ];
 
-     protected function checkType($value,$rule,$data=[])
 
-     {
 
-         if($data['type'] > 0 && empty($data['busids'])){
 
-             return '未选择关联项';
 
-         }
 
-         return true;
 
-     }
 
- }
 
 
  |