chore: 添加静态资源文件和版本配置文件
添加大量图片、字体、音频等静态资源文件,包括用户界面图片、模板文件和安装界面素材 添加系统版本配置文件(.version)和常量定义文件(.constant) 更新供应商依赖文件,包括Symfony VarDumper组件和相关许可证文件 添加验证码配置文件(captcha.php)和.gitignore规则
This commit is contained in:
62
app/validate/admin/setting/SystemAdminValidate.php
Normal file
62
app/validate/admin/setting/SystemAdminValidate.php
Normal file
@@ -0,0 +1,62 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2016~2026 https://www.crmeb.com All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: CRMEB Team <admin@crmeb.com>
|
||||
// +----------------------------------------------------------------------
|
||||
namespace app\validate\admin\setting;
|
||||
|
||||
use think\Validate;
|
||||
|
||||
class SystemAdminValidate extends Validate
|
||||
{
|
||||
/**
|
||||
* 定义验证规则
|
||||
* 格式:'字段名' => ['规则1','规则2'...]
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $rule = [
|
||||
'account' => ['require', 'alphaDash', 'length:4,64'],
|
||||
'conf_pwd' => 'require',
|
||||
'pwd' => ['require'],
|
||||
'real_name' => 'require',
|
||||
'roles' => ['require', 'array'],
|
||||
'phone' => ['require', 'mobile'],
|
||||
'head_pic' => 'max:255',
|
||||
];
|
||||
|
||||
/**
|
||||
* 定义错误信息
|
||||
* 格式:'字段名.规则名' => '错误信息'
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $message = [
|
||||
'account.require' => '请填写管理员账号',
|
||||
'account.alphaDash' => '管理员账号应为数字和字母',
|
||||
'account.length' => '管理员账号长度4-64位字符',
|
||||
'conf_pwd.require' => '请输入确认密码',
|
||||
'pwd.require' => '请输入密码',
|
||||
'real_name.require' => '请输管理员姓名',
|
||||
'roles.require' => '请选择管理员身份',
|
||||
'roles.array' => '身份必须为数组',
|
||||
'phone.require' => '请填写管理员电话',
|
||||
'phone.mobile' => '电话格式不正确',
|
||||
'head_pic.max' => '头像不能超过255个字符',
|
||||
];
|
||||
|
||||
protected $scene = [
|
||||
'get' => ['account', 'pwd'],
|
||||
'update' => ['account', 'roles', 'real_name', 'phone'],
|
||||
'save' => ['account', 'pwd', 'conf_pwd', 'roles', 'real_name', 'phone'],
|
||||
'supplier_save' => ['account', 'pwd', 'conf_pwd', 'real_name', 'phone', 'head_pic'],
|
||||
'supplier_update' => ['account', 'real_name', 'phone', 'head_pic'],
|
||||
];
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user