EnquiryRequest.php 834 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <?php
  2. namespace App\Http\Requests\Procurement;
  3. use App\Traits\RequestApiFormValidation;
  4. use Illuminate\Foundation\Http\FormRequest;
  5. class EnquiryRequest extends FormRequest
  6. {
  7. use RequestApiFormValidation;
  8. /**
  9. * Determine if the user is authorized to make this request.
  10. *
  11. * @return bool
  12. */
  13. public function authorize()
  14. {
  15. return true;
  16. }
  17. /**
  18. * Get the validation rules that apply to the request.
  19. *
  20. * @return array
  21. */
  22. public function rules()
  23. {
  24. return [
  25. 'owner_id'=>'required',
  26. 'owner_material_id'=>'required',
  27. ];
  28. }
  29. public function messages()
  30. {
  31. return [
  32. 'owner_id.required' => '项目必选',
  33. 'owner_material_id.required' => '项目耗材编码必选',
  34. ];
  35. }
  36. }