I've seen how to validate arrays in the docs. Using something like:
'users.*.name' => 'required',
On my form I have the field named:
<input name="users[0][name]">
This is actually looped out, but have statically added it in above example.
The issue I have is that the above will validate, so if there is no value in the field, it will error, and with a value, it will pass, unfortunately the input does not have an error class on it, as I suspect the name in the error bag is different to the name on the input.
How can I correctly validate / correctly name array inputs in laravel?
from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/2KWVFuV
via IFTTT
Aucun commentaire:
Enregistrer un commentaire