Laravel 5.5 - Validate Multiple Form Request - at the same time

前端 未结 7 1188
臣服心动
臣服心动 2020-12-18 13:17

The question is already asked here for a previous version of laravel and not yet answered.

I have a html form which is validated using three different

相关标签:
7条回答
  • 2020-12-18 13:39

    I would create traits containing the rules for each FormRequest - purchase, transporataion and sale. Use the trait in it's specific FormRequest and then when you need all the rules you can use all three traits in the combined FormRequest and merge the rules arrays then.

    0 讨论(0)
提交回复
热议问题