12345678910111213141516171819202122232425262728293031323334 |
- <?php
- namespace app\common\validate;
- use think\Validate;
- /**
- * ============================================================================
- *
- * ============================================================================
- * 版权所有 2014-2028 浙江惠利玛产业互联网有限公司,并保留所有权利。
- * 网站地址: https://www.valimart.net/
- * ----------------------------------------------------------------------------
- *
- * ============================================================================
- * 验证器
- */
- class Vrgroupbuy extends Validate
- {
- protected $rule = [
- 'vrgclass_name'=>'require|length:1,10',
- 'vrgclass_sort'=>'require|between:0,255'
- ];
- protected $message = [
- 'vrgclass_name.require'=>'分类名不能为空且只能在1-10之间',
- 'vrgclass_name.length'=>'分类名不能为空且只能在1-10之间',
- 'vrgclass_sort.require'=>'分类排序不能为空且只能在0-255之间',
- 'vrgclass_sort.between'=>'分类排序不能为空且只能在0-255之间'
- ];
- protected $scene = [
- 'class_add' => ['vrgclass_name', 'vrgclass_sort'],
- 'class_edit' => ['vrgclass_name', 'vrgclass_sort'],
- ];
- }
|