gamebackend/application/common/validate/IntegralValidate.php

34 lines
1.1 KiB
PHP
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?php
// +----------------------------------------------------------------------
// | 作者:修缘 联系QQ278896498 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', ],
];
}