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