InstantMessage.php 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. <?php
  2. namespace app\common\validate;
  3. use think\Validate;
  4. /**
  5. * ============================================================================
  6. * DSKMS多用户商城
  7. * ============================================================================
  8. *
  9. * ----------------------------------------------------------------------------
  10. *
  11. * ============================================================================
  12. * 验证器
  13. */
  14. class InstantMessage extends Validate
  15. {
  16. protected $rule = [
  17. 'instant_message_from_id' => 'require',
  18. 'instant_message_from_type' => 'require',
  19. 'instant_message_to_id' => 'require',
  20. 'instant_message_to_type' => 'require',
  21. 'instant_message_type' => 'require',
  22. 'instant_message' => 'require',
  23. ];
  24. protected $message = [
  25. 'instant_message_from_id.require' => '发送ID不能为空',
  26. 'instant_message_from_type.require' => '发送类型不能为空',
  27. 'instant_message_to_id.require' => '接收ID不能为空',
  28. 'instant_message_to_type.require' => '接收类型不能为空',
  29. 'instant_message_type.require' => '消息类型不能为空',
  30. 'instant_message.require' => '消息内容不能为空',
  31. ];
  32. protected $scene = [
  33. 'instant_message_save' => ['instant_message_from_id', 'instant_message_from_type', 'instant_message_to_id', 'instant_message_to_type', 'instant_message_type', 'instant_message'],
  34. ];
  35. }