Conditional Validation in ZF2
I have a form which starts with a Select with two options. There are
several other fields, some of which are required for the first Select
option, and the others required for the second Select option.
In the view, I'm using the Select to show/hide the relevant/irrelevant
fields. Most of these fields are required when their option in the Select
is selected.
What is the best way to only validate the fields that are relevant to
whatever is selected in the Select?
No comments:
Post a Comment