Support Article
Fields which are not displayed are validated as required
SA-8902
Summary
On a section there is a checkbox which determines which part(s) of the section are displayed and which are hidden. In the part which may be hidden, there are required fields. At runtime, the required fields are validated regardless whether their part of the section is visiblie or not. A browser alert is issued to correct highlighted properties. However, no highlighting is seen on screen in the Accordeon control nor on the clipboard.
Error Messages
Not Applicable
Steps to Reproduce
Create a section which would have part of the required fields being conditionally displayed.
Root Cause
The behaviour which is described is the expected behaviour.
As the text value being validated is a REQUIRED value, this means that the value is always expected to be provided by the user regardless of whether the value is displayed in a visible SECTION rule, or a hidden SECTION rule. Therefore, it seems that since the text value is REQUIRED, the text value should be located on a portion of the SECTION rule that is always visible - thereby permitting the user to input the REQUIRED value.
A suggested alternative is to not use the REQUIRED setting. Rather, provide a validate rule against the property with "when" criteria based on the value which determines whether the section is visible or hidden. When the section is visible, validation of the property can be performed.
Resolution
Uncheck the checkbox "Run visibility condition on client" to resolve the issue.
Published January 31, 2016 - Updated October 8, 2020
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.