Files
dafuweng-saiadmin6.x/server/app/channel/validate/manage/ChannelManageValidate.php
2026-03-09 11:14:34 +08:00

59 lines
1.4 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<?php
// +----------------------------------------------------------------------
// | saiadmin [ saiadmin快速开发框架 ]
// +----------------------------------------------------------------------
// | Author: your name
// +----------------------------------------------------------------------
namespace app\channel\validate\manage;
use plugin\saiadmin\basic\BaseValidate;
/**
* 渠道验证器
*/
class ChannelManageValidate extends BaseValidate
{
/**
* 定义验证规则
*/
protected $rule = [
'name' => 'require',
'title' => 'require',
'admin_id' => 'require',
'game_url' => 'require',
'image' => 'require',
];
/**
* 定义错误信息
*/
protected $message = [
'name' => '名称必须填写',
'title' => '标题必须填写',
'admin_id' => '管理员必须填写',
'game_url' => '游戏地址必须填写',
'image' => '图标必须填写',
];
/**
* 定义场景agent 由后端按 md5(name.admin_id) 自动生成,无需校验)
*/
protected $scene = [
'save' => [
'name',
'title',
'admin_id',
'game_url',
'image',
],
'update' => [
'name',
'title',
'admin_id',
'game_url',
'image',
],
];
}