截流自动化的商城平台
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

ReplyValidate.php 917B

12345678910111213141516171819202122232425262728
  1. <?php
  2. namespace app\admin\validate\wechat;
  3. use think\Validate;
  4. class ReplyValidate extends Validate
  5. {
  6. protected $rule = [
  7. 'id' => 'require',
  8. 'name' => 'require|unique:wechatReply,name^del',
  9. 'keyword' => 'require|max:5',
  10. 'content' => 'require',
  11. ];
  12. protected $message = [
  13. 'id.require' => '请选择回复',
  14. 'name.require' => '请输入规则名称',
  15. 'name.unique' => '规则名称重复',
  16. 'keyword.require' => '请输入关键词',
  17. 'keyword.max' => '关键词不能超过5个字',
  18. 'content.require' => '请输入回复内容',
  19. ];
  20. protected $scene = [
  21. 'subscribe' => ['name','content'],
  22. 'text' => ['name','keyword','content'],
  23. 'default' => ['name','content'],
  24. 'del' => ['id'],
  25. ];
  26. }