You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a child form EducationalInstitutionForm with a field customer_since, with a rule required_if:participation_type,gold,silver,bronze. participation_type is a 'choice' field in the same form. If I load the form on its own, that validation works. If I load the form as a child form inside another form, it doesn't work.
After debugging: Validator::validateRequiredIf() receives the correct attribute: educational_institution.customer_since, and has the correct $this->data, but it doesn't know the referenced field participation_type, because of the nested form. It should be educational_institution.participation_type in this case.
Since it doesn't know the field, the value is empty, and the other field isn't required.
Is there a way to make the validation work in both scenario's?: child form and form on its own
The text was updated successfully, but these errors were encountered:
I have a child form
EducationalInstitutionForm
with a fieldcustomer_since
, with a rulerequired_if:participation_type,gold,silver,bronze
.participation_type
is a 'choice' field in the same form. If I load the form on its own, that validation works. If I load the form as a child form inside another form, it doesn't work.After debugging:
Validator::validateRequiredIf()
receives the correct attribute:educational_institution.customer_since
, and has the correct$this->data
, but it doesn't know the referenced fieldparticipation_type
, because of the nested form. It should beeducational_institution.participation_type
in this case.Since it doesn't know the field, the value is empty, and the other field isn't required.
Is there a way to make the validation work in both scenario's?: child form and form on its own
The text was updated successfully, but these errors were encountered: