DeviceForm.php 447 B

1234567891011121314151617181920212223
  1. <?php
  2. namespace app\common\validate;
  3. use think\Validate;
  4. class DeviceForm extends Validate{
  5. protected $rule = [
  6. 'title|标题' => 'require|length:1,200',
  7. 'cate_id|分类' => 'require|gt:0',
  8. ];
  9. protected $message = [
  10. 'title.length' => '名称必须200字以内',
  11. 'cate_id.require' => '分类不能为空',
  12. 'cate_id.gt' => '分类不能为空',
  13. ];
  14. protected $scene = [
  15. ];
  16. }