3
I have the following situation: I want one field to be mandatory only if the other two are null
, if one of the other two is not null
this field is no longer mandatory.
I thought I’d use the required_if
, however I believe that can only declare one field and several values, but no more than one field.
The code is like this:
'signature-one'=>'required_if:signature-two,null|required_if:signature-three,null|integer',
'signature-two'=>'nullable|sometimes|integer',
'signature-three'=>'nullable|sometimes|integer',
in the manner that is the Signature-one field will be mandatory even if one of the other two is null
, and I wanted it to be mandatory only if the two were null
. Can someone help me?
and then the solution was what I needed?
– novic
It was yes expensive, very obg. I looked at the documentation, but I am not good in English and I let this kind of validation pass. vlw
– Jedson Melo