init commit
This commit is contained in:
57
application/admin/validate/Admin.php
Normal file
57
application/admin/validate/Admin.php
Normal file
@@ -0,0 +1,57 @@
|
||||
<?php
|
||||
|
||||
namespace app\admin\validate;
|
||||
|
||||
use think\Validate;
|
||||
|
||||
class Admin extends Validate
|
||||
{
|
||||
|
||||
/**
|
||||
* 验证规则
|
||||
*/
|
||||
protected $rule = [
|
||||
'username' => 'require|regex:\w{3,30}|unique:admin',
|
||||
'nickname' => 'require',
|
||||
'password' => 'require|regex:\S{32}',
|
||||
'email' => 'require|email|unique:admin,email',
|
||||
'mobile' => 'regex:1[3-9]\d{9}|unique:admin,mobile',
|
||||
];
|
||||
|
||||
/**
|
||||
* 提示消息
|
||||
*/
|
||||
protected $message = [
|
||||
];
|
||||
|
||||
/**
|
||||
* 字段描述
|
||||
*/
|
||||
protected $field = [
|
||||
];
|
||||
|
||||
/**
|
||||
* 验证场景
|
||||
*/
|
||||
protected $scene = [
|
||||
'add' => ['username', 'email', 'nickname', 'password', 'mobile'],
|
||||
'edit' => ['username', 'email', 'nickname', 'password', 'mobile'],
|
||||
];
|
||||
|
||||
public function __construct(array $rules = [], $message = [], $field = [])
|
||||
{
|
||||
$this->field = [
|
||||
'username' => __('Username'),
|
||||
'nickname' => __('Nickname'),
|
||||
'password' => __('Password'),
|
||||
'email' => __('Email'),
|
||||
'mobile' => __('Mobile'),
|
||||
];
|
||||
$this->message = array_merge($this->message, [
|
||||
'username.regex' => __('Please input correct username'),
|
||||
'password.regex' => __('Please input correct password')
|
||||
]);
|
||||
parent::__construct($rules, $message, $field);
|
||||
}
|
||||
|
||||
}
|
||||
52
application/admin/validate/AuthRule.php
Normal file
52
application/admin/validate/AuthRule.php
Normal file
@@ -0,0 +1,52 @@
|
||||
<?php
|
||||
|
||||
namespace app\admin\validate;
|
||||
|
||||
use think\Validate;
|
||||
|
||||
class AuthRule extends Validate
|
||||
{
|
||||
|
||||
/**
|
||||
* 正则
|
||||
*/
|
||||
protected $regex = ['format' => '[a-z0-9_\/]+'];
|
||||
|
||||
/**
|
||||
* 验证规则
|
||||
*/
|
||||
protected $rule = [
|
||||
'name' => 'require|unique:AuthRule',
|
||||
'title' => 'require',
|
||||
];
|
||||
|
||||
/**
|
||||
* 提示消息
|
||||
*/
|
||||
protected $message = [
|
||||
'name.format' => 'URL规则只能是小写字母、数字、下划线和/组成'
|
||||
];
|
||||
|
||||
/**
|
||||
* 字段描述
|
||||
*/
|
||||
protected $field = [
|
||||
];
|
||||
|
||||
/**
|
||||
* 验证场景
|
||||
*/
|
||||
protected $scene = [
|
||||
];
|
||||
|
||||
public function __construct(array $rules = [], $message = [], $field = [])
|
||||
{
|
||||
$this->field = [
|
||||
'name' => __('Name'),
|
||||
'title' => __('Title'),
|
||||
];
|
||||
$this->message['name.format'] = __('Name only supports letters, numbers, underscore and slash');
|
||||
parent::__construct($rules, $message, $field);
|
||||
}
|
||||
|
||||
}
|
||||
27
application/admin/validate/Category.php
Normal file
27
application/admin/validate/Category.php
Normal file
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
namespace app\admin\validate;
|
||||
|
||||
use think\Validate;
|
||||
|
||||
class Category extends Validate
|
||||
{
|
||||
/**
|
||||
* 验证规则
|
||||
*/
|
||||
protected $rule = [
|
||||
];
|
||||
/**
|
||||
* 提示消息
|
||||
*/
|
||||
protected $message = [
|
||||
];
|
||||
/**
|
||||
* 验证场景
|
||||
*/
|
||||
protected $scene = [
|
||||
'add' => [],
|
||||
'edit' => [],
|
||||
];
|
||||
|
||||
}
|
||||
50
application/admin/validate/User.php
Normal file
50
application/admin/validate/User.php
Normal file
@@ -0,0 +1,50 @@
|
||||
<?php
|
||||
|
||||
namespace app\admin\validate;
|
||||
|
||||
use think\Validate;
|
||||
|
||||
class User extends Validate
|
||||
{
|
||||
/**
|
||||
* 验证规则
|
||||
*/
|
||||
protected $rule = [
|
||||
'username' => 'require|regex:\w{3,30}|unique:user',
|
||||
'nickname' => 'require|unique:user',
|
||||
'password' => 'regex:\S{6,30}',
|
||||
'email' => 'require|email|unique:user',
|
||||
'mobile' => 'unique:user'
|
||||
];
|
||||
|
||||
/**
|
||||
* 字段描述
|
||||
*/
|
||||
protected $field = [
|
||||
];
|
||||
/**
|
||||
* 提示消息
|
||||
*/
|
||||
protected $message = [
|
||||
];
|
||||
/**
|
||||
* 验证场景
|
||||
*/
|
||||
protected $scene = [
|
||||
'add' => [],
|
||||
'edit' => ['username', 'nickname', 'password', 'email', 'mobile'],
|
||||
];
|
||||
|
||||
public function __construct(array $rules = [], $message = [], $field = [])
|
||||
{
|
||||
$this->field = [
|
||||
'username' => __('Username'),
|
||||
'nickname' => __('Nickname'),
|
||||
'password' => __('Password'),
|
||||
'email' => __('Email'),
|
||||
'mobile' => __('Mobile')
|
||||
];
|
||||
parent::__construct($rules, $message, $field);
|
||||
}
|
||||
|
||||
}
|
||||
27
application/admin/validate/UserGroup.php
Normal file
27
application/admin/validate/UserGroup.php
Normal file
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
namespace app\admin\validate;
|
||||
|
||||
use think\Validate;
|
||||
|
||||
class UserGroup extends Validate
|
||||
{
|
||||
/**
|
||||
* 验证规则
|
||||
*/
|
||||
protected $rule = [
|
||||
];
|
||||
/**
|
||||
* 提示消息
|
||||
*/
|
||||
protected $message = [
|
||||
];
|
||||
/**
|
||||
* 验证场景
|
||||
*/
|
||||
protected $scene = [
|
||||
'add' => [],
|
||||
'edit' => [],
|
||||
];
|
||||
|
||||
}
|
||||
27
application/admin/validate/UserRule.php
Normal file
27
application/admin/validate/UserRule.php
Normal file
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
namespace app\admin\validate;
|
||||
|
||||
use think\Validate;
|
||||
|
||||
class UserRule extends Validate
|
||||
{
|
||||
/**
|
||||
* 验证规则
|
||||
*/
|
||||
protected $rule = [
|
||||
];
|
||||
/**
|
||||
* 提示消息
|
||||
*/
|
||||
protected $message = [
|
||||
];
|
||||
/**
|
||||
* 验证场景
|
||||
*/
|
||||
protected $scene = [
|
||||
'add' => [],
|
||||
'edit' => [],
|
||||
];
|
||||
|
||||
}
|
||||
27
application/admin/validate/wdsxh/Album.php
Normal file
27
application/admin/validate/wdsxh/Album.php
Normal file
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
namespace app\admin\validate\wdsxh;
|
||||
|
||||
use think\Validate;
|
||||
|
||||
class Album extends Validate
|
||||
{
|
||||
/**
|
||||
* 验证规则
|
||||
*/
|
||||
protected $rule = [
|
||||
];
|
||||
/**
|
||||
* 提示消息
|
||||
*/
|
||||
protected $message = [
|
||||
];
|
||||
/**
|
||||
* 验证场景
|
||||
*/
|
||||
protected $scene = [
|
||||
'add' => [],
|
||||
'edit' => [],
|
||||
];
|
||||
|
||||
}
|
||||
27
application/admin/validate/wdsxh/AlbumConfig.php
Normal file
27
application/admin/validate/wdsxh/AlbumConfig.php
Normal file
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
namespace app\admin\validate\wdsxh;
|
||||
|
||||
use think\Validate;
|
||||
|
||||
class AlbumConfig extends Validate
|
||||
{
|
||||
/**
|
||||
* 验证规则
|
||||
*/
|
||||
protected $rule = [
|
||||
];
|
||||
/**
|
||||
* 提示消息
|
||||
*/
|
||||
protected $message = [
|
||||
];
|
||||
/**
|
||||
* 验证场景
|
||||
*/
|
||||
protected $scene = [
|
||||
'add' => [],
|
||||
'edit' => [],
|
||||
];
|
||||
|
||||
}
|
||||
36
application/admin/validate/wdsxh/Banner.php
Normal file
36
application/admin/validate/wdsxh/Banner.php
Normal file
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | 麦沃德科技赋能开发者,助力商协会发展
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2017~2024 www.wdsxh.cn All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | 沃德商协会系统并不是自由软件,不加密,并不代表开源,未经许可不可自由转售和商用
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: MY WORLD Team <bd@maiwd.cn> www.maiwd.cn
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\admin\validate\wdsxh;
|
||||
|
||||
use think\Validate;
|
||||
|
||||
class Banner extends Validate
|
||||
{
|
||||
/**
|
||||
* 验证规则
|
||||
*/
|
||||
protected $rule = [
|
||||
];
|
||||
/**
|
||||
* 提示消息
|
||||
*/
|
||||
protected $message = [
|
||||
];
|
||||
/**
|
||||
* 验证场景
|
||||
*/
|
||||
protected $scene = [
|
||||
'add' => [],
|
||||
'edit' => [],
|
||||
];
|
||||
|
||||
}
|
||||
36
application/admin/validate/wdsxh/Config.php
Normal file
36
application/admin/validate/wdsxh/Config.php
Normal file
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | 麦沃德科技赋能开发者,助力商协会发展
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2017~2024 www.wdsxh.cn All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | 沃德商协会系统并不是自由软件,不加密,并不代表开源,未经许可不可自由转售和商用
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: MY WORLD Team <bd@maiwd.cn> www.maiwd.cn
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\admin\validate\wdsxh;
|
||||
|
||||
use think\Validate;
|
||||
|
||||
class Config extends Validate
|
||||
{
|
||||
/**
|
||||
* 验证规则
|
||||
*/
|
||||
protected $rule = [
|
||||
];
|
||||
/**
|
||||
* 提示消息
|
||||
*/
|
||||
protected $message = [
|
||||
];
|
||||
/**
|
||||
* 验证场景
|
||||
*/
|
||||
protected $scene = [
|
||||
'add' => [],
|
||||
'edit' => [],
|
||||
];
|
||||
|
||||
}
|
||||
27
application/admin/validate/wdsxh/Demand.php
Normal file
27
application/admin/validate/wdsxh/Demand.php
Normal file
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
namespace app\admin\validate\wdsxh;
|
||||
|
||||
use think\Validate;
|
||||
|
||||
class Demand extends Validate
|
||||
{
|
||||
/**
|
||||
* 验证规则
|
||||
*/
|
||||
protected $rule = [
|
||||
];
|
||||
/**
|
||||
* 提示消息
|
||||
*/
|
||||
protected $message = [
|
||||
];
|
||||
/**
|
||||
* 验证场景
|
||||
*/
|
||||
protected $scene = [
|
||||
'add' => [],
|
||||
'edit' => [],
|
||||
];
|
||||
|
||||
}
|
||||
27
application/admin/validate/wdsxh/DiyPage.php
Normal file
27
application/admin/validate/wdsxh/DiyPage.php
Normal file
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
namespace app\admin\validate\wdsxh;
|
||||
|
||||
use think\Validate;
|
||||
|
||||
class DiyPage extends Validate
|
||||
{
|
||||
/**
|
||||
* 验证规则
|
||||
*/
|
||||
protected $rule = [
|
||||
];
|
||||
/**
|
||||
* 提示消息
|
||||
*/
|
||||
protected $message = [
|
||||
];
|
||||
/**
|
||||
* 验证场景
|
||||
*/
|
||||
protected $scene = [
|
||||
'add' => [],
|
||||
'edit' => [],
|
||||
];
|
||||
|
||||
}
|
||||
27
application/admin/validate/wdsxh/Faq.php
Normal file
27
application/admin/validate/wdsxh/Faq.php
Normal file
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
namespace app\admin\validate\wdsxh;
|
||||
|
||||
use think\Validate;
|
||||
|
||||
class Faq extends Validate
|
||||
{
|
||||
/**
|
||||
* 验证规则
|
||||
*/
|
||||
protected $rule = [
|
||||
];
|
||||
/**
|
||||
* 提示消息
|
||||
*/
|
||||
protected $message = [
|
||||
];
|
||||
/**
|
||||
* 验证场景
|
||||
*/
|
||||
protected $scene = [
|
||||
'add' => [],
|
||||
'edit' => [],
|
||||
];
|
||||
|
||||
}
|
||||
36
application/admin/validate/wdsxh/Jielong.php
Normal file
36
application/admin/validate/wdsxh/Jielong.php
Normal file
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | 麦沃德科技赋能开发者,助力商协会发展
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2017~2024 www.wdsxh.cn All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | 沃德商协会系统并不是自由软件,不加密,并不代表开源,未经许可不可自由转售和商用
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: MY WORLD Team <bd@maiwd.cn> www.maiwd.cn
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\admin\validate\wdsxh;
|
||||
|
||||
use think\Validate;
|
||||
|
||||
class Jielong extends Validate
|
||||
{
|
||||
/**
|
||||
* 验证规则
|
||||
*/
|
||||
protected $rule = [
|
||||
];
|
||||
/**
|
||||
* 提示消息
|
||||
*/
|
||||
protected $message = [
|
||||
];
|
||||
/**
|
||||
* 验证场景
|
||||
*/
|
||||
protected $scene = [
|
||||
'add' => [],
|
||||
'edit' => [],
|
||||
];
|
||||
|
||||
}
|
||||
27
application/admin/validate/wdsxh/Link.php
Normal file
27
application/admin/validate/wdsxh/Link.php
Normal file
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
namespace app\admin\validate\wdsxh;
|
||||
|
||||
use think\Validate;
|
||||
|
||||
class Link extends Validate
|
||||
{
|
||||
/**
|
||||
* 验证规则
|
||||
*/
|
||||
protected $rule = [
|
||||
];
|
||||
/**
|
||||
* 提示消息
|
||||
*/
|
||||
protected $message = [
|
||||
];
|
||||
/**
|
||||
* 验证场景
|
||||
*/
|
||||
protected $scene = [
|
||||
'add' => [],
|
||||
'edit' => [],
|
||||
];
|
||||
|
||||
}
|
||||
36
application/admin/validate/wdsxh/PcBanner.php
Normal file
36
application/admin/validate/wdsxh/PcBanner.php
Normal file
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | 麦沃德科技赋能开发者,助力商协会发展
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2017~2024 www.wdsxh.cn All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | 沃德商协会系统并不是自由软件,不加密,并不代表开源,未经许可不可自由转售和商用
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: MY WORLD Team <bd@maiwd.cn> www.maiwd.cn
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\admin\validate\wdsxh;
|
||||
|
||||
use think\Validate;
|
||||
|
||||
class PcBanner extends Validate
|
||||
{
|
||||
/**
|
||||
* 验证规则
|
||||
*/
|
||||
protected $rule = [
|
||||
];
|
||||
/**
|
||||
* 提示消息
|
||||
*/
|
||||
protected $message = [
|
||||
];
|
||||
/**
|
||||
* 验证场景
|
||||
*/
|
||||
protected $scene = [
|
||||
'add' => [],
|
||||
'edit' => [],
|
||||
];
|
||||
|
||||
}
|
||||
36
application/admin/validate/wdsxh/PcBusinessAssociation.php
Normal file
36
application/admin/validate/wdsxh/PcBusinessAssociation.php
Normal file
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | 麦沃德科技赋能开发者,助力商协会发展
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2017~2024 www.wdsxh.cn All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | 沃德商协会系统并不是自由软件,不加密,并不代表开源,未经许可不可自由转售和商用
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: MY WORLD Team <bd@maiwd.cn> www.maiwd.cn
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\admin\validate\wdsxh;
|
||||
|
||||
use think\Validate;
|
||||
|
||||
class PcBusinessAssociation extends Validate
|
||||
{
|
||||
/**
|
||||
* 验证规则
|
||||
*/
|
||||
protected $rule = [
|
||||
];
|
||||
/**
|
||||
* 提示消息
|
||||
*/
|
||||
protected $message = [
|
||||
];
|
||||
/**
|
||||
* 验证场景
|
||||
*/
|
||||
protected $scene = [
|
||||
'add' => [],
|
||||
'edit' => [],
|
||||
];
|
||||
|
||||
}
|
||||
27
application/admin/validate/wdsxh/PersonCenterDiyPage.php
Normal file
27
application/admin/validate/wdsxh/PersonCenterDiyPage.php
Normal file
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
namespace app\admin\validate\wdsxh;
|
||||
|
||||
use think\Validate;
|
||||
|
||||
class DiyPage extends Validate
|
||||
{
|
||||
/**
|
||||
* 验证规则
|
||||
*/
|
||||
protected $rule = [
|
||||
];
|
||||
/**
|
||||
* 提示消息
|
||||
*/
|
||||
protected $message = [
|
||||
];
|
||||
/**
|
||||
* 验证场景
|
||||
*/
|
||||
protected $scene = [
|
||||
'add' => [],
|
||||
'edit' => [],
|
||||
];
|
||||
|
||||
}
|
||||
27
application/admin/validate/wdsxh/Quickmenu.php
Normal file
27
application/admin/validate/wdsxh/Quickmenu.php
Normal file
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
namespace app\admin\validate\wdsxh;
|
||||
|
||||
use think\Validate;
|
||||
|
||||
class Quickmenu extends Validate
|
||||
{
|
||||
/**
|
||||
* 验证规则
|
||||
*/
|
||||
protected $rule = [
|
||||
];
|
||||
/**
|
||||
* 提示消息
|
||||
*/
|
||||
protected $message = [
|
||||
];
|
||||
/**
|
||||
* 验证场景
|
||||
*/
|
||||
protected $scene = [
|
||||
'add' => [],
|
||||
'edit' => [],
|
||||
];
|
||||
|
||||
}
|
||||
27
application/admin/validate/wdsxh/Tabbar.php
Normal file
27
application/admin/validate/wdsxh/Tabbar.php
Normal file
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
namespace app\admin\validate\wdsxh;
|
||||
|
||||
use think\Validate;
|
||||
|
||||
class Tabbar extends Validate
|
||||
{
|
||||
/**
|
||||
* 验证规则
|
||||
*/
|
||||
protected $rule = [
|
||||
];
|
||||
/**
|
||||
* 提示消息
|
||||
*/
|
||||
protected $message = [
|
||||
];
|
||||
/**
|
||||
* 验证场景
|
||||
*/
|
||||
protected $scene = [
|
||||
'add' => [],
|
||||
'edit' => [],
|
||||
];
|
||||
|
||||
}
|
||||
104
application/admin/validate/wdsxh/activity/Activity.php
Normal file
104
application/admin/validate/wdsxh/activity/Activity.php
Normal file
@@ -0,0 +1,104 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | 麦沃德科技赋能开发者,助力商协会发展
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2017~2024 www.wdsxh.cn All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | 沃德商协会系统并不是自由软件,不加密,并不代表开源,未经许可不可自由转售和商用
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: MY WORLD Team <bd@maiwd.cn> www.maiwd.cn
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\admin\validate\wdsxh\activity;
|
||||
|
||||
use think\Validate;
|
||||
|
||||
class Activity extends Validate
|
||||
{
|
||||
/**
|
||||
* 验证规则
|
||||
*/
|
||||
protected $rule = [
|
||||
'fees'=>'require|checkFees',
|
||||
'organizing_method'=>'require|checkAddress',
|
||||
'apply_time'=>'require|checkApplyTime',
|
||||
'end_time'=>'require|checkEndTime',
|
||||
'is_verifying'=>'require|checkVerifyingWechatIds',
|
||||
'points_status'=>'require|checkPointsStatus',
|
||||
];
|
||||
/**
|
||||
* 提示消息
|
||||
*/
|
||||
protected $message = [
|
||||
'organizing_method.require' => '请选择举办方式',
|
||||
];
|
||||
/**
|
||||
* 验证场景
|
||||
*/
|
||||
protected $scene = [
|
||||
'add' => ['organizing_method','apply_time','end_time','is_verifying','points_status'],
|
||||
'edit' => ['organizing_method','is_verifying','points_status'],
|
||||
];
|
||||
|
||||
protected function checkAddress($value,$rule,$data)
|
||||
{
|
||||
if ($value == 1 && empty($data['url'])) {
|
||||
return '请输入线上网址';
|
||||
}
|
||||
if ($value == 1 && $data['is_verifying'] == '1') {
|
||||
return '线上活动是否核销必须选择否';
|
||||
}
|
||||
if ($value == 2 && empty($data['address'])) {
|
||||
return '请选择线下地址位置';
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
protected function checkApplyTime($value,$rule,$data)
|
||||
{
|
||||
if ($value > $data['start_time']) {
|
||||
return '报名时间不能大于开始时间';
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
protected function checkEndTime($value,$rule,$data)
|
||||
{
|
||||
if ($value < $data['apply_time']) {
|
||||
return '报名时间不能大于结束时间';
|
||||
}
|
||||
|
||||
if ($value <= $data['start_time']) {
|
||||
return '开始时间不能大于结束时间';
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
protected function checkVerifyingWechatIds($value,$rule,$data)
|
||||
{
|
||||
if ($value == '1' && $data['verification_method'] == 2 && empty($data['verifying_wechat_ids'])) {
|
||||
return '请选择核销管理员';
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
protected function checkFees($value,$rule,$data)
|
||||
{
|
||||
if (in_array($value,[0,0.00]) && $data['refund'] == '1') {
|
||||
return '报名费用0元,不能选择退款';
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
protected function checkPointsStatus($value,$rule,$data)
|
||||
{
|
||||
if ($value == '1' && empty($data['points'])) {
|
||||
return '请输入积分数量';
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
35
application/admin/validate/wdsxh/article/Article.php
Normal file
35
application/admin/validate/wdsxh/article/Article.php
Normal file
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | 麦沃德科技赋能开发者,助力商协会发展
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2017~2024 www.wdsxh.cn All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | 沃德商协会系统并不是自由软件,不加密,并不代表开源,未经许可不可自由转售和商用
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: MY WORLD Team <bd@maiwd.cn> www.maiwd.cn
|
||||
// +----------------------------------------------------------------------
|
||||
namespace app\admin\validate\wdsxh\article;
|
||||
|
||||
use think\Validate;
|
||||
|
||||
class Article extends Validate
|
||||
{
|
||||
/**
|
||||
* 验证规则
|
||||
*/
|
||||
protected $rule = [
|
||||
];
|
||||
/**
|
||||
* 提示消息
|
||||
*/
|
||||
protected $message = [
|
||||
];
|
||||
/**
|
||||
* 验证场景
|
||||
*/
|
||||
protected $scene = [
|
||||
'add' => [],
|
||||
'edit' => [],
|
||||
];
|
||||
|
||||
}
|
||||
35
application/admin/validate/wdsxh/article/ArticleCat.php
Normal file
35
application/admin/validate/wdsxh/article/ArticleCat.php
Normal file
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | 麦沃德科技赋能开发者,助力商协会发展
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2017~2024 www.wdsxh.cn All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | 沃德商协会系统并不是自由软件,不加密,并不代表开源,未经许可不可自由转售和商用
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: MY WORLD Team <bd@maiwd.cn> www.maiwd.cn
|
||||
// +----------------------------------------------------------------------
|
||||
namespace app\admin\validate\wdsxh\article;
|
||||
|
||||
use think\Validate;
|
||||
|
||||
class ArticleCat extends Validate
|
||||
{
|
||||
/**
|
||||
* 验证规则
|
||||
*/
|
||||
protected $rule = [
|
||||
];
|
||||
/**
|
||||
* 提示消息
|
||||
*/
|
||||
protected $message = [
|
||||
];
|
||||
/**
|
||||
* 验证场景
|
||||
*/
|
||||
protected $scene = [
|
||||
'add' => [],
|
||||
'edit' => [],
|
||||
];
|
||||
|
||||
}
|
||||
35
application/admin/validate/wdsxh/business/Association.php
Normal file
35
application/admin/validate/wdsxh/business/Association.php
Normal file
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | 麦沃德科技赋能开发者,助力商协会发展
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2017~2024 www.wdsxh.cn All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | 沃德商协会系统并不是自由软件,不加密,并不代表开源,未经许可不可自由转售和商用
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: MY WORLD Team <bd@maiwd.cn> www.maiwd.cn
|
||||
// +----------------------------------------------------------------------
|
||||
namespace app\admin\validate\wdsxh\business;
|
||||
|
||||
use think\Validate;
|
||||
|
||||
class Association extends Validate
|
||||
{
|
||||
/**
|
||||
* 验证规则
|
||||
*/
|
||||
protected $rule = [
|
||||
];
|
||||
/**
|
||||
* 提示消息
|
||||
*/
|
||||
protected $message = [
|
||||
];
|
||||
/**
|
||||
* 验证场景
|
||||
*/
|
||||
protected $scene = [
|
||||
'add' => [],
|
||||
'edit' => [],
|
||||
];
|
||||
|
||||
}
|
||||
35
application/admin/validate/wdsxh/business/Business.php
Normal file
35
application/admin/validate/wdsxh/business/Business.php
Normal file
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | 麦沃德科技赋能开发者,助力商协会发展
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2017~2024 www.wdsxh.cn All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | 沃德商协会系统并不是自由软件,不加密,并不代表开源,未经许可不可自由转售和商用
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: MY WORLD Team <bd@maiwd.cn> www.maiwd.cn
|
||||
// +----------------------------------------------------------------------
|
||||
namespace app\admin\validate\wdsxh\business;
|
||||
|
||||
use think\Validate;
|
||||
|
||||
class Business extends Validate
|
||||
{
|
||||
/**
|
||||
* 验证规则
|
||||
*/
|
||||
protected $rule = [
|
||||
];
|
||||
/**
|
||||
* 提示消息
|
||||
*/
|
||||
protected $message = [
|
||||
];
|
||||
/**
|
||||
* 验证场景
|
||||
*/
|
||||
protected $scene = [
|
||||
'add' => [],
|
||||
'edit' => [],
|
||||
];
|
||||
|
||||
}
|
||||
35
application/admin/validate/wdsxh/business/BusinessConfig.php
Normal file
35
application/admin/validate/wdsxh/business/BusinessConfig.php
Normal file
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | 麦沃德科技赋能开发者,助力商协会发展
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2017~2024 www.wdsxh.cn All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | 沃德商协会系统并不是自由软件,不加密,并不代表开源,未经许可不可自由转售和商用
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: MY WORLD Team <bd@maiwd.cn> www.maiwd.cn
|
||||
// +----------------------------------------------------------------------
|
||||
namespace app\admin\validate\wdsxh\business;
|
||||
|
||||
use think\Validate;
|
||||
|
||||
class BusinessConfig extends Validate
|
||||
{
|
||||
/**
|
||||
* 验证规则
|
||||
*/
|
||||
protected $rule = [
|
||||
];
|
||||
/**
|
||||
* 提示消息
|
||||
*/
|
||||
protected $message = [
|
||||
];
|
||||
/**
|
||||
* 验证场景
|
||||
*/
|
||||
protected $scene = [
|
||||
'add' => [],
|
||||
'edit' => [],
|
||||
];
|
||||
|
||||
}
|
||||
35
application/admin/validate/wdsxh/business/Category.php
Normal file
35
application/admin/validate/wdsxh/business/Category.php
Normal file
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | 麦沃德科技赋能开发者,助力商协会发展
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2017~2024 www.wdsxh.cn All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | 沃德商协会系统并不是自由软件,不加密,并不代表开源,未经许可不可自由转售和商用
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: MY WORLD Team <bd@maiwd.cn> www.maiwd.cn
|
||||
// +----------------------------------------------------------------------
|
||||
namespace app\admin\validate\wdsxh\business;
|
||||
|
||||
use think\Validate;
|
||||
|
||||
class Category extends Validate
|
||||
{
|
||||
/**
|
||||
* 验证规则
|
||||
*/
|
||||
protected $rule = [
|
||||
];
|
||||
/**
|
||||
* 提示消息
|
||||
*/
|
||||
protected $message = [
|
||||
];
|
||||
/**
|
||||
* 验证场景
|
||||
*/
|
||||
protected $scene = [
|
||||
'add' => [],
|
||||
'edit' => [],
|
||||
];
|
||||
|
||||
}
|
||||
27
application/admin/validate/wdsxh/corporate/Card.php
Normal file
27
application/admin/validate/wdsxh/corporate/Card.php
Normal file
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
namespace app\admin\validate\wdsxh\corporate;
|
||||
|
||||
use think\Validate;
|
||||
|
||||
class Card extends Validate
|
||||
{
|
||||
/**
|
||||
* 验证规则
|
||||
*/
|
||||
protected $rule = [
|
||||
];
|
||||
/**
|
||||
* 提示消息
|
||||
*/
|
||||
protected $message = [
|
||||
];
|
||||
/**
|
||||
* 验证场景
|
||||
*/
|
||||
protected $scene = [
|
||||
'add' => [],
|
||||
'edit' => [],
|
||||
];
|
||||
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
namespace app\admin\validate\wdsxh\corporate;
|
||||
|
||||
use think\Validate;
|
||||
|
||||
class CardBackground extends Validate
|
||||
{
|
||||
/**
|
||||
* 验证规则
|
||||
*/
|
||||
protected $rule = [
|
||||
];
|
||||
/**
|
||||
* 提示消息
|
||||
*/
|
||||
protected $message = [
|
||||
];
|
||||
/**
|
||||
* 验证场景
|
||||
*/
|
||||
protected $scene = [
|
||||
'add' => [],
|
||||
'edit' => [],
|
||||
];
|
||||
|
||||
}
|
||||
27
application/admin/validate/wdsxh/institution/Institution.php
Normal file
27
application/admin/validate/wdsxh/institution/Institution.php
Normal file
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
namespace app\admin\validate\wdsxh\institution;
|
||||
|
||||
use think\Validate;
|
||||
|
||||
class Institution extends Validate
|
||||
{
|
||||
/**
|
||||
* 验证规则
|
||||
*/
|
||||
protected $rule = [
|
||||
];
|
||||
/**
|
||||
* 提示消息
|
||||
*/
|
||||
protected $message = [
|
||||
];
|
||||
/**
|
||||
* 验证场景
|
||||
*/
|
||||
protected $scene = [
|
||||
'add' => [],
|
||||
'edit' => [],
|
||||
];
|
||||
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
namespace app\admin\validate\wdsxh\institution;
|
||||
|
||||
use think\Validate;
|
||||
|
||||
class InstitutionMemberApply extends Validate
|
||||
{
|
||||
/**
|
||||
* 验证规则
|
||||
*/
|
||||
protected $rule = [
|
||||
];
|
||||
/**
|
||||
* 提示消息
|
||||
*/
|
||||
protected $message = [
|
||||
];
|
||||
/**
|
||||
* 验证场景
|
||||
*/
|
||||
protected $scene = [
|
||||
'add' => [],
|
||||
'edit' => [],
|
||||
];
|
||||
|
||||
}
|
||||
27
application/admin/validate/wdsxh/institution/Level.php
Normal file
27
application/admin/validate/wdsxh/institution/Level.php
Normal file
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
namespace app\admin\validate\wdsxh\institution;
|
||||
|
||||
use think\Validate;
|
||||
|
||||
class Level extends Validate
|
||||
{
|
||||
/**
|
||||
* 验证规则
|
||||
*/
|
||||
protected $rule = [
|
||||
];
|
||||
/**
|
||||
* 提示消息
|
||||
*/
|
||||
protected $message = [
|
||||
];
|
||||
/**
|
||||
* 验证场景
|
||||
*/
|
||||
protected $scene = [
|
||||
'add' => [],
|
||||
'edit' => [],
|
||||
];
|
||||
|
||||
}
|
||||
27
application/admin/validate/wdsxh/institution/Member.php
Normal file
27
application/admin/validate/wdsxh/institution/Member.php
Normal file
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
namespace app\admin\validate\wdsxh\institution;
|
||||
|
||||
use think\Validate;
|
||||
|
||||
class Member extends Validate
|
||||
{
|
||||
/**
|
||||
* 验证规则
|
||||
*/
|
||||
protected $rule = [
|
||||
];
|
||||
/**
|
||||
* 提示消息
|
||||
*/
|
||||
protected $message = [
|
||||
];
|
||||
/**
|
||||
* 验证场景
|
||||
*/
|
||||
protected $scene = [
|
||||
'add' => [],
|
||||
'edit' => [],
|
||||
];
|
||||
|
||||
}
|
||||
35
application/admin/validate/wdsxh/mall/Banner.php
Normal file
35
application/admin/validate/wdsxh/mall/Banner.php
Normal file
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | 麦沃德科技赋能开发者,助力商协会发展
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2017~2024 www.wdsxh.cn All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | 沃德商协会系统并不是自由软件,不加密,并不代表开源,未经许可不可自由转售和商用
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: MY WORLD Team <bd@maiwd.cn> www.maiwd.cn
|
||||
// +----------------------------------------------------------------------
|
||||
namespace app\admin\validate\wdsxh\mall;
|
||||
|
||||
use think\Validate;
|
||||
|
||||
class Banner extends Validate
|
||||
{
|
||||
/**
|
||||
* 验证规则
|
||||
*/
|
||||
protected $rule = [
|
||||
];
|
||||
/**
|
||||
* 提示消息
|
||||
*/
|
||||
protected $message = [
|
||||
];
|
||||
/**
|
||||
* 验证场景
|
||||
*/
|
||||
protected $scene = [
|
||||
'add' => [],
|
||||
'edit' => [],
|
||||
];
|
||||
|
||||
}
|
||||
35
application/admin/validate/wdsxh/mall/Express.php
Normal file
35
application/admin/validate/wdsxh/mall/Express.php
Normal file
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | 麦沃德科技赋能开发者,助力商协会发展
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2017~2024 www.wdsxh.cn All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | 沃德商协会系统并不是自由软件,不加密,并不代表开源,未经许可不可自由转售和商用
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: MY WORLD Team <bd@maiwd.cn> www.maiwd.cn
|
||||
// +----------------------------------------------------------------------
|
||||
namespace app\admin\validate\wdsxh\mall;
|
||||
|
||||
use think\Validate;
|
||||
|
||||
class Express extends Validate
|
||||
{
|
||||
/**
|
||||
* 验证规则
|
||||
*/
|
||||
protected $rule = [
|
||||
];
|
||||
/**
|
||||
* 提示消息
|
||||
*/
|
||||
protected $message = [
|
||||
];
|
||||
/**
|
||||
* 验证场景
|
||||
*/
|
||||
protected $scene = [
|
||||
'add' => [],
|
||||
'edit' => [],
|
||||
];
|
||||
|
||||
}
|
||||
44
application/admin/validate/wdsxh/mall/FreightRules.php
Normal file
44
application/admin/validate/wdsxh/mall/FreightRules.php
Normal file
@@ -0,0 +1,44 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | 麦沃德科技赋能开发者,助力商协会发展
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2017~2024 www.wdsxh.cn All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | 沃德商协会系统并不是自由软件,不加密,并不代表开源,未经许可不可自由转售和商用
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: MY WORLD Team <bd@maiwd.cn> www.maiwd.cn
|
||||
// +----------------------------------------------------------------------
|
||||
namespace app\admin\validate\wdsxh\mall;
|
||||
|
||||
use think\Validate;
|
||||
|
||||
class FreightRules extends Validate
|
||||
{
|
||||
/**
|
||||
* 验证规则
|
||||
*/
|
||||
protected $rule = [
|
||||
'min|最小数' =>'require',
|
||||
'max|最大数' =>'require|checkMax',
|
||||
];
|
||||
/**
|
||||
* 提示消息
|
||||
*/
|
||||
protected $message = [
|
||||
];
|
||||
/**
|
||||
* 验证场景
|
||||
*/
|
||||
protected $scene = [
|
||||
'add' => ['min','max'],
|
||||
'edit' => ['min','max'],
|
||||
];
|
||||
protected function checkMax($value,$rule,$data)
|
||||
{
|
||||
if($data['min'] > $value) {
|
||||
return '最小数不能大于最大数';
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
35
application/admin/validate/wdsxh/mall/Goods.php
Normal file
35
application/admin/validate/wdsxh/mall/Goods.php
Normal file
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | 麦沃德科技赋能开发者,助力商协会发展
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2017~2024 www.wdsxh.cn All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | 沃德商协会系统并不是自由软件,不加密,并不代表开源,未经许可不可自由转售和商用
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: MY WORLD Team <bd@maiwd.cn> www.maiwd.cn
|
||||
// +----------------------------------------------------------------------
|
||||
namespace app\admin\validate\wdsxh\mall;
|
||||
|
||||
use think\Validate;
|
||||
|
||||
class Goods extends Validate
|
||||
{
|
||||
/**
|
||||
* 验证规则
|
||||
*/
|
||||
protected $rule = [
|
||||
];
|
||||
/**
|
||||
* 提示消息
|
||||
*/
|
||||
protected $message = [
|
||||
];
|
||||
/**
|
||||
* 验证场景
|
||||
*/
|
||||
protected $scene = [
|
||||
'add' => [],
|
||||
'edit' => [],
|
||||
];
|
||||
|
||||
}
|
||||
35
application/admin/validate/wdsxh/mall/GoodsCategory.php
Normal file
35
application/admin/validate/wdsxh/mall/GoodsCategory.php
Normal file
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | 麦沃德科技赋能开发者,助力商协会发展
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2017~2024 www.wdsxh.cn All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | 沃德商协会系统并不是自由软件,不加密,并不代表开源,未经许可不可自由转售和商用
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: MY WORLD Team <bd@maiwd.cn> www.maiwd.cn
|
||||
// +----------------------------------------------------------------------
|
||||
namespace app\admin\validate\wdsxh\mall;
|
||||
|
||||
use think\Validate;
|
||||
|
||||
class GoodsCategory extends Validate
|
||||
{
|
||||
/**
|
||||
* 验证规则
|
||||
*/
|
||||
protected $rule = [
|
||||
];
|
||||
/**
|
||||
* 提示消息
|
||||
*/
|
||||
protected $message = [
|
||||
];
|
||||
/**
|
||||
* 验证场景
|
||||
*/
|
||||
protected $scene = [
|
||||
'add' => [],
|
||||
'edit' => [],
|
||||
];
|
||||
|
||||
}
|
||||
35
application/admin/validate/wdsxh/mall/Order.php
Normal file
35
application/admin/validate/wdsxh/mall/Order.php
Normal file
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | 麦沃德科技赋能开发者,助力商协会发展
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2017~2024 www.wdsxh.cn All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | 沃德商协会系统并不是自由软件,不加密,并不代表开源,未经许可不可自由转售和商用
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: MY WORLD Team <bd@maiwd.cn> www.maiwd.cn
|
||||
// +----------------------------------------------------------------------
|
||||
namespace app\admin\validate\wdsxh\mall;
|
||||
|
||||
use think\Validate;
|
||||
|
||||
class Order extends Validate
|
||||
{
|
||||
/**
|
||||
* 验证规则
|
||||
*/
|
||||
protected $rule = [
|
||||
];
|
||||
/**
|
||||
* 提示消息
|
||||
*/
|
||||
protected $message = [
|
||||
];
|
||||
/**
|
||||
* 验证场景
|
||||
*/
|
||||
protected $scene = [
|
||||
'add' => [],
|
||||
'edit' => [],
|
||||
];
|
||||
|
||||
}
|
||||
36
application/admin/validate/wdsxh/mall/Refund.php
Normal file
36
application/admin/validate/wdsxh/mall/Refund.php
Normal file
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | 麦沃德科技赋能开发者,助力商协会发展
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2017~2024 www.wdsxh.cn All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | 沃德商协会系统并不是自由软件,不加密,并不代表开源,未经许可不可自由转售和商用
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: MY WORLD Team <bd@maiwd.cn> www.maiwd.cn
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\admin\validate\wdsxh\mall;
|
||||
|
||||
use think\Validate;
|
||||
|
||||
class Refund extends Validate
|
||||
{
|
||||
/**
|
||||
* 验证规则
|
||||
*/
|
||||
protected $rule = [
|
||||
];
|
||||
/**
|
||||
* 提示消息
|
||||
*/
|
||||
protected $message = [
|
||||
];
|
||||
/**
|
||||
* 验证场景
|
||||
*/
|
||||
protected $scene = [
|
||||
'add' => [],
|
||||
'edit' => [],
|
||||
];
|
||||
|
||||
}
|
||||
27
application/admin/validate/wdsxh/member/Cert.php
Normal file
27
application/admin/validate/wdsxh/member/Cert.php
Normal file
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
namespace app\admin\controller\wdsxh\member;
|
||||
|
||||
use think\Validate;
|
||||
|
||||
class Cert extends Validate
|
||||
{
|
||||
/**
|
||||
* 验证规则
|
||||
*/
|
||||
protected $rule = [
|
||||
];
|
||||
/**
|
||||
* 提示消息
|
||||
*/
|
||||
protected $message = [
|
||||
];
|
||||
/**
|
||||
* 验证场景
|
||||
*/
|
||||
protected $scene = [
|
||||
'add' => [],
|
||||
'edit' => [],
|
||||
];
|
||||
|
||||
}
|
||||
36
application/admin/validate/wdsxh/member/Company.php
Normal file
36
application/admin/validate/wdsxh/member/Company.php
Normal file
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | 麦沃德科技赋能开发者,助力商协会发展
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2017~2024 www.wdsxh.cn All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | 沃德商协会系统并不是自由软件,不加密,并不代表开源,未经许可不可自由转售和商用
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: MY WORLD Team <bd@maiwd.cn> www.maiwd.cn
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\admin\validate\wdsxh\member;
|
||||
|
||||
use think\Validate;
|
||||
|
||||
class Company extends Validate
|
||||
{
|
||||
/**
|
||||
* 验证规则
|
||||
*/
|
||||
protected $rule = [
|
||||
];
|
||||
/**
|
||||
* 提示消息
|
||||
*/
|
||||
protected $message = [
|
||||
];
|
||||
/**
|
||||
* 验证场景
|
||||
*/
|
||||
protected $scene = [
|
||||
'add' => [],
|
||||
'edit' => [],
|
||||
];
|
||||
|
||||
}
|
||||
54
application/admin/validate/wdsxh/member/FeesConfig.php
Normal file
54
application/admin/validate/wdsxh/member/FeesConfig.php
Normal file
@@ -0,0 +1,54 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | 麦沃德科技赋能开发者,助力商协会发展
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2017~2024 www.wdsxh.cn All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | 沃德商协会系统并不是自由软件,不加密,并不代表开源,未经许可不可自由转售和商用
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: MY WORLD Team <bd@maiwd.cn> www.maiwd.cn
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\admin\validate\wdsxh\member;
|
||||
|
||||
use think\Validate;
|
||||
|
||||
class FeesConfig extends Validate
|
||||
{
|
||||
/**
|
||||
* 验证规则
|
||||
*/
|
||||
protected $rule = [
|
||||
'expire_time_type' => 'require|checkDaysAndDate',
|
||||
];
|
||||
/**
|
||||
* 提示消息
|
||||
*/
|
||||
protected $message = [
|
||||
];
|
||||
/**
|
||||
* 验证场景
|
||||
*/
|
||||
protected $scene = [
|
||||
'edit' => ['expire_time_type'],
|
||||
];
|
||||
|
||||
protected function checkDaysAndDate($value,$rule,$data)
|
||||
{
|
||||
if ($value == 1) {//自由时间验证
|
||||
if (empty($data['days'])) {
|
||||
return '请输入自由时间天数';
|
||||
}
|
||||
} else {
|
||||
if (empty($data['fixed_date'])) {
|
||||
return '请选择固定日期';
|
||||
}
|
||||
$fixed_date = (new \app\admin\model\wdsxh\member\FeesConfig())->where('id',1)->value('fixed_date');
|
||||
if( ($fixed_date != $data['fixed_date']) && $data['fixed_date'] <= date('Y-m-d',time())) {
|
||||
return '固定时间只能设置当前时间之后的时间';
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
36
application/admin/validate/wdsxh/member/IndustryCategory.php
Normal file
36
application/admin/validate/wdsxh/member/IndustryCategory.php
Normal file
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | 麦沃德科技赋能开发者,助力商协会发展
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2017~2024 www.wdsxh.cn All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | 沃德商协会系统并不是自由软件,不加密,并不代表开源,未经许可不可自由转售和商用
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: MY WORLD Team <bd@maiwd.cn> www.maiwd.cn
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\admin\validate\wdsxh\member;
|
||||
|
||||
use think\Validate;
|
||||
|
||||
class IndustryCategory extends Validate
|
||||
{
|
||||
/**
|
||||
* 验证规则
|
||||
*/
|
||||
protected $rule = [
|
||||
];
|
||||
/**
|
||||
* 提示消息
|
||||
*/
|
||||
protected $message = [
|
||||
];
|
||||
/**
|
||||
* 验证场景
|
||||
*/
|
||||
protected $scene = [
|
||||
'add' => [],
|
||||
'edit' => [],
|
||||
];
|
||||
|
||||
}
|
||||
27
application/admin/validate/wdsxh/member/JoinConfig.php
Normal file
27
application/admin/validate/wdsxh/member/JoinConfig.php
Normal file
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
namespace app\admin\validate\wdsxh\member;
|
||||
|
||||
use think\Validate;
|
||||
|
||||
class JoinConfig extends Validate
|
||||
{
|
||||
/**
|
||||
* 验证规则
|
||||
*/
|
||||
protected $rule = [
|
||||
];
|
||||
/**
|
||||
* 提示消息
|
||||
*/
|
||||
protected $message = [
|
||||
];
|
||||
/**
|
||||
* 验证场景
|
||||
*/
|
||||
protected $scene = [
|
||||
'add' => [],
|
||||
'edit' => [],
|
||||
];
|
||||
|
||||
}
|
||||
48
application/admin/validate/wdsxh/member/Level.php
Normal file
48
application/admin/validate/wdsxh/member/Level.php
Normal file
@@ -0,0 +1,48 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | 麦沃德科技赋能开发者,助力商协会发展
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2017~2024 www.wdsxh.cn All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | 沃德商协会系统并不是自由软件,不加密,并不代表开源,未经许可不可自由转售和商用
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: MY WORLD Team <bd@maiwd.cn> www.maiwd.cn
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\admin\validate\wdsxh\member;
|
||||
|
||||
use app\admin\model\wdsxh\member\FeesConfig;
|
||||
use think\Validate;
|
||||
|
||||
class Level extends Validate
|
||||
{
|
||||
/**
|
||||
* 验证规则
|
||||
*/
|
||||
protected $rule = [
|
||||
'fees'=>'require|checkFees',
|
||||
];
|
||||
/**
|
||||
* 提示消息
|
||||
*/
|
||||
protected $message = [
|
||||
];
|
||||
/**
|
||||
* 验证场景
|
||||
*/
|
||||
protected $scene = [
|
||||
'add' => ['fees'],
|
||||
'edit' => ['fees'],
|
||||
];
|
||||
|
||||
protected function checkFees($value,$rule,$data)
|
||||
{
|
||||
//todo 免费入会和会员级别0元冲突问题:
|
||||
$pay_method = (new FeesConfig())->where('id',1)->value('pay_method');
|
||||
if (($pay_method != '1') && $value <= 0) {
|
||||
return '请前往入会设置→免费入会';
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
59
application/admin/validate/wdsxh/member/Member.php
Normal file
59
application/admin/validate/wdsxh/member/Member.php
Normal file
@@ -0,0 +1,59 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | 麦沃德科技赋能开发者,助力商协会发展
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2017~2024 www.wdsxh.cn All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | 沃德商协会系统并不是自由软件,不加密,并不代表开源,未经许可不可自由转售和商用
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: MY WORLD Team <bd@maiwd.cn> www.maiwd.cn
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\admin\validate\wdsxh\member;
|
||||
|
||||
use think\Validate;
|
||||
|
||||
class Member extends Validate
|
||||
{
|
||||
/**
|
||||
* 验证规则
|
||||
*/
|
||||
protected $rule = [
|
||||
'mobile'=>'require|checkMobile',
|
||||
];
|
||||
/**
|
||||
* 提示消息
|
||||
*/
|
||||
protected $message = [
|
||||
'mobile.require' => '手机号不能为空',
|
||||
];
|
||||
/**
|
||||
* 验证场景
|
||||
*/
|
||||
protected $scene = [
|
||||
'add' => ['mobile'],
|
||||
'edit' => ['mobile'],
|
||||
];
|
||||
|
||||
protected function checkMobile($value,$rule,$data)
|
||||
{
|
||||
$memberModel = new \app\api\model\wdsxh\member\Member();
|
||||
if (isset($data['id']) && !empty($data['id'])) {//编辑
|
||||
$memberId = $memberModel->where('id','<>',$data['id'])
|
||||
->where('mobile',$value)
|
||||
->value('id');
|
||||
if ($memberId) {
|
||||
return '手机号已被使用';
|
||||
}
|
||||
} else {
|
||||
$memberId = $memberModel
|
||||
->where('mobile',$value)
|
||||
->value('id');
|
||||
if ($memberId) {
|
||||
return '手机号已被使用';
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
36
application/admin/validate/wdsxh/member/Organize.php
Normal file
36
application/admin/validate/wdsxh/member/Organize.php
Normal file
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | 麦沃德科技赋能开发者,助力商协会发展
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2017~2024 www.wdsxh.cn All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | 沃德商协会系统并不是自由软件,不加密,并不代表开源,未经许可不可自由转售和商用
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: MY WORLD Team <bd@maiwd.cn> www.maiwd.cn
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\admin\validate\wdsxh\member;
|
||||
|
||||
use think\Validate;
|
||||
|
||||
class Organize extends Validate
|
||||
{
|
||||
/**
|
||||
* 验证规则
|
||||
*/
|
||||
protected $rule = [
|
||||
];
|
||||
/**
|
||||
* 提示消息
|
||||
*/
|
||||
protected $message = [
|
||||
];
|
||||
/**
|
||||
* 验证场景
|
||||
*/
|
||||
protected $scene = [
|
||||
'add' => [],
|
||||
'edit' => [],
|
||||
];
|
||||
|
||||
}
|
||||
36
application/admin/validate/wdsxh/member/Person.php
Normal file
36
application/admin/validate/wdsxh/member/Person.php
Normal file
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | 麦沃德科技赋能开发者,助力商协会发展
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2017~2024 www.wdsxh.cn All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | 沃德商协会系统并不是自由软件,不加密,并不代表开源,未经许可不可自由转售和商用
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: MY WORLD Team <bd@maiwd.cn> www.maiwd.cn
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\admin\validate\wdsxh\member;
|
||||
|
||||
use think\Validate;
|
||||
|
||||
class Person extends Validate
|
||||
{
|
||||
/**
|
||||
* 验证规则
|
||||
*/
|
||||
protected $rule = [
|
||||
];
|
||||
/**
|
||||
* 提示消息
|
||||
*/
|
||||
protected $message = [
|
||||
];
|
||||
/**
|
||||
* 验证场景
|
||||
*/
|
||||
protected $scene = [
|
||||
'add' => [],
|
||||
'edit' => [],
|
||||
];
|
||||
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | 麦沃德科技赋能开发者,助力商协会发展
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2017~2024 www.wdsxh.cn All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | 沃德商协会系统并不是自由软件,不加密,并不代表开源,未经许可不可自由转售和商用
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: MY WORLD Team <bd@maiwd.cn> www.maiwd.cn
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\admin\validate\wdsxh\message;
|
||||
|
||||
use think\Validate;
|
||||
|
||||
/**
|
||||
* 消息通知验证器
|
||||
*/
|
||||
class MessageNotification extends Validate
|
||||
{
|
||||
/**
|
||||
* 验证规则
|
||||
*/
|
||||
protected $rule = [
|
||||
'member_id' => 'require',
|
||||
'type' => 'require|in:1,2,3',
|
||||
'title' => 'require|max:255',
|
||||
'content' => 'require',
|
||||
];
|
||||
|
||||
/**
|
||||
* 提示消息
|
||||
*/
|
||||
protected $message = [
|
||||
'member_id.require' => '会员ID不能为空',
|
||||
'type.require' => '消息类型不能为空',
|
||||
'type.in' => '消息类型必须为:1=活动通知,2=审核通知,3=系统通知',
|
||||
'title.require' => '消息标题不能为空',
|
||||
'title.max' => '消息标题最多不能超过255个字符',
|
||||
'content.require' => '消息内容不能为空',
|
||||
];
|
||||
|
||||
/**
|
||||
* 验证场景
|
||||
*/
|
||||
protected $scene = [
|
||||
'add' => ['member_id', 'type', 'title', 'content'],
|
||||
'edit' => ['type', 'title', 'content'],
|
||||
];
|
||||
}
|
||||
27
application/admin/validate/wdsxh/points/Express.php
Normal file
27
application/admin/validate/wdsxh/points/Express.php
Normal file
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
namespace app\admin\validate\wdsxh\points;
|
||||
|
||||
use think\Validate;
|
||||
|
||||
class Express extends Validate
|
||||
{
|
||||
/**
|
||||
* 验证规则
|
||||
*/
|
||||
protected $rule = [
|
||||
];
|
||||
/**
|
||||
* 提示消息
|
||||
*/
|
||||
protected $message = [
|
||||
];
|
||||
/**
|
||||
* 验证场景
|
||||
*/
|
||||
protected $scene = [
|
||||
'add' => [],
|
||||
'edit' => [],
|
||||
];
|
||||
|
||||
}
|
||||
31
application/admin/validate/wdsxh/points/Goods.php
Normal file
31
application/admin/validate/wdsxh/points/Goods.php
Normal file
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
namespace app\admin\validate\wdsxh\points;
|
||||
|
||||
use think\Validate;
|
||||
|
||||
class Goods extends Validate
|
||||
{
|
||||
/**
|
||||
* 验证规则
|
||||
*/
|
||||
protected $rule = [
|
||||
'points' => 'require|number|gt:0',
|
||||
];
|
||||
/**
|
||||
* 提示消息
|
||||
*/
|
||||
protected $message = [
|
||||
'points.require' => '积分不能为空',
|
||||
'points.number' => '积分必须是数字',
|
||||
'points.gt' => '积分必须大于0',
|
||||
];
|
||||
/**
|
||||
* 验证场景
|
||||
*/
|
||||
protected $scene = [
|
||||
'add' => ['points'],
|
||||
'edit' => ['points'],
|
||||
];
|
||||
|
||||
}
|
||||
27
application/admin/validate/wdsxh/questionnaire/Category.php
Normal file
27
application/admin/validate/wdsxh/questionnaire/Category.php
Normal file
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
namespace app\admin\validate\wdsxh\questionnaire;
|
||||
|
||||
use think\Validate;
|
||||
|
||||
class Category extends Validate
|
||||
{
|
||||
/**
|
||||
* 验证规则
|
||||
*/
|
||||
protected $rule = [
|
||||
];
|
||||
/**
|
||||
* 提示消息
|
||||
*/
|
||||
protected $message = [
|
||||
];
|
||||
/**
|
||||
* 验证场景
|
||||
*/
|
||||
protected $scene = [
|
||||
'add' => [],
|
||||
'edit' => [],
|
||||
];
|
||||
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | 麦沃德科技赋能开发者,助力商协会发展
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2017~2024 www.wdsxh.cn All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | 沃德商协会系统并不是自由软件,不加密,并不代表开源,未经许可不可自由转售和商用
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: MY WORLD Team <bd@maiwd.cn> www.maiwd.cn
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\admin\validate\wdsxh\questionnaire;
|
||||
|
||||
use think\Validate;
|
||||
|
||||
class Questionnaire extends Validate
|
||||
{
|
||||
/**
|
||||
* 验证规则
|
||||
*/
|
||||
protected $rule = [
|
||||
];
|
||||
/**
|
||||
* 提示消息
|
||||
*/
|
||||
protected $message = [
|
||||
];
|
||||
/**
|
||||
* 验证场景
|
||||
*/
|
||||
protected $scene = [
|
||||
'add' => [],
|
||||
'edit' => [],
|
||||
];
|
||||
|
||||
}
|
||||
36
application/admin/validate/wdsxh/questionnaire/Render.php
Normal file
36
application/admin/validate/wdsxh/questionnaire/Render.php
Normal file
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | 麦沃德科技赋能开发者,助力商协会发展
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2017~2024 www.wdsxh.cn All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | 沃德商协会系统并不是自由软件,不加密,并不代表开源,未经许可不可自由转售和商用
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: MY WORLD Team <bd@maiwd.cn> www.maiwd.cn
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\admin\validate\wdsxh\questionnaire;
|
||||
|
||||
use think\Validate;
|
||||
|
||||
class Render extends Validate
|
||||
{
|
||||
/**
|
||||
* 验证规则
|
||||
*/
|
||||
protected $rule = [
|
||||
];
|
||||
/**
|
||||
* 提示消息
|
||||
*/
|
||||
protected $message = [
|
||||
];
|
||||
/**
|
||||
* 验证场景
|
||||
*/
|
||||
protected $scene = [
|
||||
'add' => [],
|
||||
'edit' => [],
|
||||
];
|
||||
|
||||
}
|
||||
36
application/admin/validate/wdsxh/questionnaire/Topic.php
Normal file
36
application/admin/validate/wdsxh/questionnaire/Topic.php
Normal file
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | 麦沃德科技赋能开发者,助力商协会发展
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2017~2024 www.wdsxh.cn All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | 沃德商协会系统并不是自由软件,不加密,并不代表开源,未经许可不可自由转售和商用
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: MY WORLD Team <bd@maiwd.cn> www.maiwd.cn
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\admin\validate\wdsxh\questionnaire;
|
||||
|
||||
use think\Validate;
|
||||
|
||||
class Topic extends Validate
|
||||
{
|
||||
/**
|
||||
* 验证规则
|
||||
*/
|
||||
protected $rule = [
|
||||
];
|
||||
/**
|
||||
* 提示消息
|
||||
*/
|
||||
protected $message = [
|
||||
];
|
||||
/**
|
||||
* 验证场景
|
||||
*/
|
||||
protected $scene = [
|
||||
'add' => [],
|
||||
'edit' => [],
|
||||
];
|
||||
|
||||
}
|
||||
50
application/admin/validate/wdsxh/user/User.php
Normal file
50
application/admin/validate/wdsxh/user/User.php
Normal file
@@ -0,0 +1,50 @@
|
||||
<?php
|
||||
|
||||
namespace app\admin\model\wdsxh\validate\user;
|
||||
|
||||
use think\Validate;
|
||||
|
||||
class User extends Validate
|
||||
{
|
||||
/**
|
||||
* 验证规则
|
||||
*/
|
||||
protected $rule = [
|
||||
'username' => 'require|regex:\w{3,30}|unique:user',
|
||||
'nickname' => 'require|unique:user',
|
||||
'password' => 'regex:\S{6,30}',
|
||||
'email' => 'require|email|unique:user',
|
||||
'mobile' => 'unique:user'
|
||||
];
|
||||
|
||||
/**
|
||||
* 字段描述
|
||||
*/
|
||||
protected $field = [
|
||||
];
|
||||
/**
|
||||
* 提示消息
|
||||
*/
|
||||
protected $message = [
|
||||
];
|
||||
/**
|
||||
* 验证场景
|
||||
*/
|
||||
protected $scene = [
|
||||
'add' => [],
|
||||
'edit' => ['username', 'nickname', 'password', 'email', 'mobile'],
|
||||
];
|
||||
|
||||
public function __construct(array $rules = [], $message = [], $field = [])
|
||||
{
|
||||
$this->field = [
|
||||
'username' => __('Username'),
|
||||
'nickname' => __('Nickname'),
|
||||
'password' => __('Password'),
|
||||
'email' => __('Email'),
|
||||
'mobile' => __('Mobile')
|
||||
];
|
||||
parent::__construct($rules, $message, $field);
|
||||
}
|
||||
|
||||
}
|
||||
36
application/admin/validate/wdsxh/user/Wechat.php
Normal file
36
application/admin/validate/wdsxh/user/Wechat.php
Normal file
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | 麦沃德科技赋能开发者,助力商协会发展
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2017~2024 www.wdsxh.cn All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | 沃德商协会系统并不是自由软件,不加密,并不代表开源,未经许可不可自由转售和商用
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: MY WORLD Team <bd@maiwd.cn> www.maiwd.cn
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\admin\validate\wdsxh\user;
|
||||
|
||||
use think\Validate;
|
||||
|
||||
class Wechat extends Validate
|
||||
{
|
||||
/**
|
||||
* 验证规则
|
||||
*/
|
||||
protected $rule = [
|
||||
];
|
||||
/**
|
||||
* 提示消息
|
||||
*/
|
||||
protected $message = [
|
||||
];
|
||||
/**
|
||||
* 验证场景
|
||||
*/
|
||||
protected $scene = [
|
||||
'add' => [],
|
||||
'edit' => [],
|
||||
];
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user