Laravel Validate Array of Inputs

后端 未结 1 788
梦如初夏
梦如初夏 2021-01-19 12:55

I have a form:





        
相关标签:
1条回答
  • 2021-01-19 13:37

    by default if you didn't provide a column name for the unique rule, Laravel will add the input name, and in your case the input name is a number.

    to fix this issue change the rule to the following instead:

    return ['name.*' => 'unique:names,name'];
    
    0 讨论(0)
提交回复
热议问题