LoginValidate.php 1.1 KB

123456789101112131415161718192021222324252627282930313233343536
  1. <?php
  2. // +----------------------------------------------------------------------
  3. // | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
  4. // +----------------------------------------------------------------------
  5. // | Copyright (c) 2016~2023 https://www.crmeb.com All rights reserved.
  6. // +----------------------------------------------------------------------
  7. // | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
  8. // +----------------------------------------------------------------------
  9. // | Author: CRMEB Team <admin@crmeb.com>
  10. // +----------------------------------------------------------------------
  11. namespace app\outapi\validate;
  12. use think\Validate;
  13. class LoginValidate extends Validate
  14. {
  15. protected $regex = ['account' => '/^[a-zA-Z0-9]{4,30}$/'];
  16. /**
  17. * @var string[]
  18. */
  19. protected $rule = [
  20. 'appid' => 'require|account',
  21. 'appsecret' => 'require',
  22. ];
  23. /**
  24. * @var string[]
  25. */
  26. protected $message = [
  27. 'appid.require' => 400133,
  28. 'appid.account' => 400140,
  29. 'appsecret.regex' => 400134,
  30. ];
  31. }