Initial commit: queue workspace
Made-with: Cursor
This commit is contained in:
46
pro_v3.5.1/app/validate/admin/user/UserLabelCateValidate.php
Normal file
46
pro_v3.5.1/app/validate/admin/user/UserLabelCateValidate.php
Normal file
@@ -0,0 +1,46 @@
|
||||
<?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\user;
|
||||
|
||||
|
||||
use think\Validate;
|
||||
|
||||
/**
|
||||
* Class UserLabelCateValidate
|
||||
* @package app\validate\admin\user
|
||||
*/
|
||||
class UserLabelCateValidate extends Validate
|
||||
{
|
||||
|
||||
/**
|
||||
* 定义验证规则
|
||||
* 格式:'字段名' => ['规则1','规则2'...]
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $rule = [
|
||||
'name' => 'require',
|
||||
'sort' => 'require|number'
|
||||
];
|
||||
|
||||
/**
|
||||
* 定义错误信息
|
||||
* 格式:'字段名.规则名' => '错误信息'
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $message = [
|
||||
'name.require' => '请填写标签分类名称',
|
||||
'sort.require' => '请填写标签分类排序',
|
||||
'sort.number' => '标签分类必须为数字'
|
||||
];
|
||||
}
|
||||
38
pro_v3.5.1/app/validate/admin/user/UserValidate.php
Normal file
38
pro_v3.5.1/app/validate/admin/user/UserValidate.php
Normal file
@@ -0,0 +1,38 @@
|
||||
<?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\user;
|
||||
|
||||
use think\Validate;
|
||||
|
||||
class UserValidate extends Validate
|
||||
{
|
||||
/**
|
||||
* 定义验证规则
|
||||
* 格式:'字段名' => ['规则1','规则2'...]
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $rule = [
|
||||
'pwd' => 'require|length:4,64',
|
||||
];
|
||||
|
||||
/**
|
||||
* 定义错误信息
|
||||
* 格式:'字段名.规则名' => '错误信息'
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $message = [
|
||||
'pwd.require' => '请填写密码',
|
||||
'pwd.length' => '密码4-64长度字符',
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
<?php
|
||||
declare (strict_types=1);
|
||||
|
||||
namespace app\validate\admin\user\channel;
|
||||
|
||||
use think\Validate;
|
||||
|
||||
class ChannelMerchantIdentityValidate extends Validate
|
||||
{
|
||||
/**
|
||||
* 定义验证规则
|
||||
* 格式:'字段名' => ['规则1','规则2'...]
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $rule = [
|
||||
'name' => 'require|string',
|
||||
// 'level' => 'require|integer|egt:0',
|
||||
'discount' => 'require|integer|between:0,100',
|
||||
'is_show' => 'require|in:0,1'
|
||||
];
|
||||
|
||||
/**
|
||||
* 定义错误信息
|
||||
* 格式:'字段名.规则名' => '错误信息'
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $message = [
|
||||
'name.require' => '请输入身份名称',
|
||||
'name.string' => '身份名称必须为字符串',
|
||||
// 'level.require' => '请输入等级',
|
||||
// 'level.integer' => '等级必须为整数',
|
||||
// 'level.egt' => '等级不能小于0',
|
||||
'discount.require' => '请输入折扣比例',
|
||||
'discount.integer' => '折扣比例必须为整数',
|
||||
'discount.between' => '折扣比例必须在0-100之间',
|
||||
'is_show.require' => '请选择显示状态',
|
||||
'is_show.in' => '显示状态值错误'
|
||||
];
|
||||
}
|
||||
Reference in New Issue
Block a user