lundi 20 juillet 2020

Laravel 5.7 validation using required_with and required_with_all for 3 fields does not work

My question is how does logics using required_with and required_with_all for Laravel validation works?

I have read the documentation but can not get anything from it documentation link

I am applying for 3 different fields

Let me give you my example now to get what I want

'start' => 'nullable|required_with:end',
'end' => 'nullable|required_with:start',
'repeat' => 'nullable|required_with_all:start,end',

if I just submit with only repeat field no validation is performed in Laravel.

You can remove nullable is from the code I copied from, still no validation is performed if you provide only repeat field.



from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/39drr2r
via IFTTT

Aucun commentaire:

Enregistrer un commentaire