InstantMessage.php 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. <?php
  2. namespace app\common\validate;
  3. use think\Validate;
  4. /**
  5. * ============================================================================
  6. * DSKMS多用户商城
  7. * ============================================================================
  8. * 版权所有 2014-2028 浙江惠利玛产业互联网有限公司,并保留所有权利。
  9. * 网站地址: https://www.valimart.net/
  10. * ----------------------------------------------------------------------------
  11. *
  12. * ============================================================================
  13. * 验证器
  14. */
  15. class InstantMessage extends Validate
  16. {
  17. protected $rule = [
  18. 'instant_message_from_id'=>'require',
  19. 'instant_message_from_type'=>'require',
  20. 'instant_message_to_id'=>'require',
  21. 'instant_message_to_type'=>'require',
  22. 'instant_message_type'=>'require',
  23. 'instant_message'=>'require',
  24. ];
  25. protected $message = [
  26. 'instant_message_from_id.require' => '发送ID不能为空',
  27. 'instant_message_from_type.require' => '发送类型不能为空',
  28. 'instant_message_to_id.require' => '接收ID不能为空',
  29. 'instant_message_to_type.require' => '接收类型不能为空',
  30. 'instant_message_type.require' => '消息类型不能为空',
  31. 'instant_message.require' => '消息内容不能为空',
  32. ];
  33. protected $scene = [
  34. 'instant_message_save' => ['instant_message_from_id', 'instant_message_from_type', 'instant_message_to_id', 'instant_message_to_type', 'instant_message_type', 'instant_message'],
  35. ];
  36. }