12345678910111213141516171819202122232425 |
- <?php
- namespace app\validate\merchant;
- use think\Validate;
- class LabelRuleValidate extends Validate
- {
- protected $failException = true;
- protected $rule = [
- 'type|规则类型' => 'require|in:0,1',
- 'min|最小值' => 'require|float|>=:0',
- 'max|最大值' => 'require|float|>=:min',
- 'label_name|标签名' => 'require|length:2,10'
- ];
- protected $message = [
- 'max.egt' => '最大值必须大于等于最小值',
- ];
- }
|