You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
41 lines
1.3 KiB
41 lines
1.3 KiB
<?php
|
|
// +----------------------------------------------------------------------
|
|
// | Niucloud-admin 企业快速开发的多应用管理平台
|
|
// +----------------------------------------------------------------------
|
|
// | 官方网址:https://www.niucloud.com
|
|
// +----------------------------------------------------------------------
|
|
// | niucloud团队 版权所有 开源版本可自由商用
|
|
// +----------------------------------------------------------------------
|
|
// | Author: Niucloud Team
|
|
// +----------------------------------------------------------------------
|
|
|
|
namespace addon\hygl\app\validate\user_coupons;
|
|
|
|
use core\base\BaseValidate;
|
|
|
|
/**
|
|
* 用户优惠券验证器
|
|
* Class UserCoupons
|
|
* @package addon\hygl\app\validate\user_coupons
|
|
*/
|
|
class UserCoupons extends BaseValidate
|
|
{
|
|
|
|
protected $rule = [
|
|
'user_id' => 'require',
|
|
'coupons_id' => 'require',
|
|
'is_show' => 'require',
|
|
];
|
|
|
|
protected $message = [
|
|
'user_id.require' => ['common_validate.require', ['user_id']],
|
|
'coupons_id.require' => ['common_validate.require', ['coupons_id']],
|
|
'is_show.require' => ['common_validate.require', ['is_show']],
|
|
];
|
|
|
|
protected $scene = [
|
|
"add" => ['user_id', 'coupons_id', 'is_show'],
|
|
"edit" => ['user_id', 'coupons_id', 'is_show']
|
|
];
|
|
|
|
}
|
|
|