3
I have a system on Laravel 5. I have a Form Request validating the fields of a form with some rules.
And here’s what I needed to do: I have a tab on the form that registers the partners of a company. The user has the option to register or not the members. I have a checkbox that controls this, it comes "false" by default... So if the user wants to register the partner, he "checks" the checkbox to fill in the membership data.
I would like to do a function that if the partner’s checkbox is checked, it does the validation in the fields: - name, - participation. Otherwise, it does not validate in these fields.
I saw a way to create a Serviceprovider for this, but how will I take the field "cadsocios" (checkbox) and check if it has value within a Request in the Standard?
what is the version of your Laravel?
– novic