UserStudentAuthRequest.php 618 B

12345678910111213141516171819202122232425262728293031
  1. <?php
  2. /**
  3. * Created by PhpStorm.
  4. * User: Mead
  5. * Date: 2019/8/5
  6. * Time: 3:22 PM
  7. */
  8. namespace App\Http\Requests;
  9. use App\Validators\Rules;
  10. class UserStudentAuthRequest extends FormRequest
  11. {
  12. /**
  13. * Get the validation rules that apply to the request.
  14. *
  15. * @return array
  16. */
  17. public function rules()
  18. {
  19. return [
  20. 'name' => 'required|string',
  21. 'no' => 'required|integer',
  22. 'school' => 'required|string',
  23. 'type' => 'required|integer',
  24. 'year' => 'sometimes|string',
  25. 'imgs' => 'required|string',
  26. ];
  27. }
  28. }