UpTroubleRequest.php 615 B

123456789101112131415161718192021222324252627282930
  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 UpTroubleRequest 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. 'bike_no' => Rules::bike_no,
  21. 'area_id' => Rules::area_id,
  22. 'trouble_part' => 'required|string|max:300',
  23. 'trouble_description' => 'required|string|max:300',
  24. 'trouble_imgs' => 'sometimes|string',
  25. ];
  26. }
  27. }