Storesnshome.php 862 B

12345678910111213141516171819202122232425262728293031323334
  1. <?php
  2. namespace app\common\validate;
  3. use think\Validate;
  4. /**
  5. *
  6. *
  7. * ----------------------------------------------------------------------------
  8. *
  9. * 验证器
  10. */
  11. class Storesnshome extends Validate
  12. {
  13. protected $rule = [
  14. 'commentcontent' => 'require|length:0,140',
  15. 'forwardcontent' => 'require|length:0,140',
  16. ];
  17. protected $message = [
  18. 'commentcontent.require' => '需要评论点内容|不能超过140字',
  19. 'commentcontent.length' => '需要评论点内容|不能超过140字',
  20. 'forwardcontent.require' => '需要评论点内容|不能超过140字',
  21. 'forwardcontent.length' => '需要评论点内容|不能超过140字',
  22. ];
  23. protected $scene = [
  24. 'addcomment' => ['commentcontent'],
  25. 'addforward' => ['forwardcontent'],
  26. ];
  27. }