data_center/app/adminapi/validate/setting/WebSettingValidate.php

50 lines
1.9 KiB
PHP
Raw Normal View History

2023-09-18 09:11:13 +08:00
<?php
// +----------------------------------------------------------------------
// | likeadmin快速开发前后端分离管理后台PHP版
// +----------------------------------------------------------------------
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
// | 开源版本可自由商用可去除界面版权logo
// | gitee下载https://gitee.com/likeshop_gitee/likeadmin
// | github下载https://github.com/likeshop-github/likeadmin
// | 访问官网https://www.likeadmin.cn
// | likeadmin团队 版权所有 拥有最终解释权
// +----------------------------------------------------------------------
// | author: likeadminTeam
// +----------------------------------------------------------------------
namespace app\adminapi\validate\setting;
use app\common\validate\BaseValidate;
/**
* 网站设置验证器
* Class WebSettingValidate
* @package app\adminapi\validate\setting
*/
class WebSettingValidate extends BaseValidate
{
protected $rule = [
'name' => 'require|max:30',
'web_favicon' => 'require',
'web_logo' => 'require',
'login_image' => 'require',
'shop_name' => 'require',
'shop_logo' => 'require',
'pc_logo' => 'require',
];
protected $message = [
'name.require' => '请填写网站名称',
'name.max' => '网站名称最长为12个字符',
'web_favicon.require' => '请上传网站图标',
'web_logo.require' => '请上传网站logo',
'login_image.require' => '请上传登录页广告图',
'shop_name.require' => '请填写前台名称',
'shop_logo.require' => '请上传前台logo',
'pc_logo.require' => '请上传PC端logo',
];
protected $scene = [
'website' => ['name', 'web_favicon', 'web_logo', 'login_image', 'shop_name', 'shop_logo', 'pc_logo'],
];
}