Sellersns.php 701 B

1234567891011121314151617181920212223242526272829303132
  1. <?php
  2. namespace app\common\validate;
  3. use think\Validate;
  4. /**
  5. *
  6. *
  7. * ----------------------------------------------------------------------------
  8. *
  9. * 验证器
  10. */
  11. class Sellersns extends Validate
  12. {
  13. protected $rule = [
  14. 'content' => 'require|length:1,140',
  15. 'goods_url' => 'url'
  16. ];
  17. protected $message = [
  18. 'content.require' => '内容不能为空且不能超过140个字',
  19. 'content.length' => '内容不能为空且不能超过140个字',
  20. 'goods_url.url' => 'url格式不正确,请输入这正确的格式!'
  21. ];
  22. protected $scene = [
  23. 'store_sns_save' => ['content', 'goods_url'],
  24. ];
  25. }