Laravel Array Validation: 2 Practical Examples

preview_player
Показать описание
Two simple examples from our latest course.

- - - - -
Support the channel by checking out my products:

- - - - -
Other places to follow:
Рекомендации по теме
Комментарии
Автор

Your ability to teach is impressive, I haven't been able to clearly understand a lesson this good since the videos from the guy that makes Symfony tutorials!

gssj-op
Автор

Great video, I would love to see an example with form items that are indexed arrays.

alan_tucker
Автор

Exactly what I was looking for to use in my project, thanks you!

bradevans
Автор

Sir very useful video.... thank you so much

prachipimpalkhute
Автор

I wonder if there is a way of doing Laravel validation in a reactive way only using Laravel (no livewire and no JS) 🤔

ikarolaborda
Автор

Really interesting Povilas, thanks!
We tried using ‘$this->route(‘game’)’ in the rules of our FormRequest but we get the game id (as a string) instead of the game object while using route model binding. Any idea how to fix this?

JNL
Автор

Is there an elegant way to change the value to some default one in case of invalid entry instead of thowing error? What is the received approach?

roman_zabigaliuk
Автор

'exists:users, id' - this is very bad rule for validation array data. This rule call new DB query for each element of array. If your array has 1000 users - your validation call 1000 DB query. I think, its very bad situation. Usually, i create custom rule with one select query by array of ids and compare counted results.

aldwynconjurer