'checkContent', 'to_user_id|执行人' => 'require', ]; protected $message = [ ]; protected $scene = [ 'addShow' => ['content'], 'dispatchAdd' => ['content'], 'send' => ['to_user_id'], ]; protected function checkContent($value,$rule,$data=[]) { if($data['work_type_mode']!=3){ if(empty($value)){ $images = isset($data['images']) ? $data['images'] : ''; $videos = isset($data['videos']) ? $data['videos'] : ''; $voices = isset($data['voices']) ? $data['voices'] : ''; if(empty($images) && empty($videos) && empty($voices)){ return '内容不能为空'; }else{ return true; } }else{ return true; } }else{ return true; } } }