MessageValidate.php 676 B

12345678910111213141516171819202122232425262728
  1. <?php
  2. /**
  3. * MessageValidate.php UTF-8
  4. *
  5. * @date : 2018/6/11 15:52
  6. *
  7. * @license 这不是一个自由软件,未经授权不许任何使用和传播。
  8. * @author : luowei <lw@huosdk.com>
  9. * @version : HUOSDK 8.0
  10. */
  11. namespace api\wapapp\validate;
  12. class MessageValidate extends BaseValidate {
  13. protected $scene
  14. = [
  15. 'detail' => ['id'],
  16. ];
  17. public function __construct(array $rules = [], array $message = [], array $field = []) {
  18. $rules = [
  19. 'id' => 'require',
  20. ];
  21. $message = [
  22. 'id.require' => lang('id is null'),
  23. ];
  24. parent::__construct($rules, $message, $field);
  25. }
  26. }