DingoTestRequest.php 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. <?php
  2. namespace Mpociot\ApiDoc\Tests\Fixtures;
  3. use Dingo\Api\Http\FormRequest;
  4. class DingoTestRequest extends FormRequest
  5. {
  6. public function rules()
  7. {
  8. return [
  9. 'required' => 'required',
  10. 'accepted' => 'accepted',
  11. 'after' => 'after:2016-04-23 14:31:00',
  12. 'active_url' => 'active_url',
  13. 'alpha' => 'alpha',
  14. 'alpha_dash' => 'alpha_dash',
  15. 'alpha_num' => 'alpha_num',
  16. 'array' => 'array',
  17. 'before' => 'before:2016-04-23 14:31:00',
  18. 'between' => 'between:5,200',
  19. 'string_between' => 'string|between:5,200',
  20. 'boolean' => 'boolean',
  21. 'date' => 'date',
  22. 'date_format' => 'date_format:j.n.Y H:iP',
  23. 'different' => 'different:alpha_num',
  24. 'digits' => 'digits:2',
  25. 'digits_between' => 'digits_between:2,10',
  26. 'exists' => 'exists:users,firstname',
  27. 'single_exists' => 'exists:users',
  28. 'file' => 'file',
  29. 'in' => 'in:jpeg,png,bmp,gif,svg',
  30. 'integer' => 'integer',
  31. 'image' => 'image',
  32. 'ip' => 'ip',
  33. 'json' => 'json',
  34. 'min' => 'min:20',
  35. 'max' => 'max:10',
  36. 'mimes' => 'mimes:jpeg,bmp,png',
  37. 'not_in' => 'not_in:foo,bar',
  38. 'numeric' => 'numeric',
  39. 'regex' => 'regex:(.*)',
  40. 'required_if' => 'required_if:foo,bar',
  41. 'multiple_required_if' => 'required_if:foo,bar,baz,qux',
  42. 'required_unless' => 'required_unless:foo,bar',
  43. 'required_with' => 'required_with:foo,bar,baz',
  44. 'required_with_all' => 'required_with_all:foo,bar,baz',
  45. 'required_without' => 'required_without:foo,bar,baz',
  46. 'required_without_all' => 'required_without_all:foo,bar,baz',
  47. 'same' => 'same:foo',
  48. 'size' => 'size:51',
  49. 'timezone' => 'timezone',
  50. 'url' => 'url',
  51. ];
  52. }
  53. }