CompanyAuthRequest.php 598 B

123456789101112131415161718192021222324252627282930
  1. <?php
  2. namespace General\Requests;
  3. class CompanyAuthRequest extends Request
  4. {
  5. use BaseAuthConfig;
  6. /**
  7. * Get the validation rules that apply to the request.
  8. *
  9. * @return array
  10. */
  11. public function rules()
  12. {
  13. return [
  14. 'app_id' => 'required|string|exists:company_auth_configs',
  15. 'nonce_str' => 'required|string',
  16. 'timestamp' => 'required|string',
  17. 'sign' => 'required|string',
  18. ];
  19. }
  20. public function messages()
  21. {
  22. return [
  23. 'app_id.exists' => '未授权!',
  24. ];
  25. }
  26. }