WebConfig.php 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <?php
  2. // +----------------------------------------------------------------------
  3. // | Niucloud-admin 企业快速开发的saas管理平台
  4. // +----------------------------------------------------------------------
  5. // | 官方网址:https://www.niucloud.com
  6. // +----------------------------------------------------------------------
  7. // | niucloud团队 版权所有 开源版本可自由商用
  8. // +----------------------------------------------------------------------
  9. // | Author: Niucloud Team
  10. // +----------------------------------------------------------------------
  11. namespace app\validate\web;
  12. use think\Validate;
  13. /**
  14. * 电脑端设置验证
  15. * Class WebConfig
  16. * @package app\validate\web
  17. */
  18. class WebConfig extends Validate
  19. {
  20. protected $rule = [
  21. 'is_show_shop' => 'number|between:0,1',
  22. 'shop_ad_image' => 'require|max:255',
  23. 'site_ids' =>'require'
  24. ];
  25. protected $message = [
  26. 'is_show_shop.number' => 'validate_shop_config.is_show_shop_number',
  27. 'is_show_shop.between' => 'validate_shop_config.is_show_shop_between',
  28. 'shop_ad_image.require' => 'validate_shop_config.shop_ad_image_require',
  29. 'shop_ad_image.max' => 'validate_shop_config.shop_ad_image_max',
  30. 'site_ids.require' => 'validate_shop_config.site_ids_require',
  31. ];
  32. protected $scene = [
  33. 'set' => ['is_show_shop', 'shop_ad_image', 'site_ids'],
  34. ];
  35. }