39 lines
1.3 KiB
PHP
39 lines
1.3 KiB
PHP
![]() |
<?php
|
|||
|
// +----------------------------------------------------------------------
|
|||
|
// | 作者:修缘 联系QQ:278896498 QQ群:1054861244
|
|||
|
// | 声明:未经作者许可,禁止倒卖等商业运营,违者必究
|
|||
|
// | 另接php业务,网站制作、代理后台、gm后台、支付对接等
|
|||
|
// +----------------------------------------------------------------------
|
|||
|
// | 创建时间: 2022/1/19 3:12
|
|||
|
// +----------------------------------------------------------------------
|
|||
|
|
|||
|
|
|||
|
namespace app\common\validate;
|
|||
|
|
|||
|
|
|||
|
class DayLimitValidate extends Validate
|
|||
|
{
|
|||
|
protected $rule = [
|
|||
|
'name' => 'require',
|
|||
|
'itemid' => 'require',
|
|||
|
'time' => 'require|number',
|
|||
|
'price' => 'require|number',
|
|||
|
'discount' => 'number',
|
|||
|
];
|
|||
|
protected $message = [
|
|||
|
'name.require' => '请选择物品',
|
|||
|
'itemid.require' => '请选择物品',
|
|||
|
'time.require' => '限购数量不能为空',
|
|||
|
'time.number' => '限购数量只能是正整数',
|
|||
|
'price.require' => '价格不能为空',
|
|||
|
'price.number' => '价格只能是正整数',
|
|||
|
|
|||
|
'discount.number' => '折扣只能是正整数',
|
|||
|
];
|
|||
|
|
|||
|
protected $scene = [
|
|||
|
'add' => ['name', 'itemid', 'time', 'price','discount'],
|
|||
|
'edit' => ['itemid', 'time', 'price','discount'],
|
|||
|
];
|
|||
|
|
|||
|
}
|