May I ask what kind of custom validation are we talking about? For example is it a character limit or a restriction to use a specific type of character for input?
Hi Josh, the short answer is that we are simply checking to confirm that the question/field has been answered.
The longer explanation is that we are doing conditional logic show/hide and ran in to trouble in the scenario of “required” fields (as defined in EE) that were still hidden.
I can advise to set any of the fields to optional that could be conditionally hidden. Then, you can add a bit of JavaScript to your custom JavaScript that adds a “required” class to the field only when it’s displayed. In other words, if the field is shown, then require it. Otherwise don’t require it.
Here’s a quick codepen demo that shows how that can work:
The support post ‘EE4 From Custom Validation Continued – prevent submission w/ error’ is closed to new replies.
Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.
Support forum for Event Espresso 3 and Event Espresso 4.