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_wtih 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 fileds

Let me give you my exapmle 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.



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire