Hi, I've just changed from C6 to C7 and I'm rebuilding my forms. But I'm having trouble finding a functionality I used in C6.
I have several form variables of type array that I need to validate at submission. I need to check if each array contains a specific number of elements. These variables are defined in custom HTML form elements.
in C6, there was a "Validate Data" item that could be placed in the "Submit" action. In the "Fields setup" field of that item I could specify each array, a pre-defined validation rule, plus the error message in a format like:
Like this example:
In C7, the Action Editor no longer includes a "Validate data" item. The "Submit" element in the View Editor also doesn't include this. I did find a "Validate Fields" option under form Settings > Behaviors > Data, but it is not configurable. I assume this only toggles validation on/off for validation definitions available in specific field types under "Behaviors", but the HTML element doesn't include a "Validation" option.
So, how in C7 can I validate the size of a form variable array at form submission?
I have several form variables of type array that I need to validate at submission. I need to check if each array contains a specific number of elements. These variables are defined in custom HTML form elements.
in C6, there was a "Validate Data" item that could be placed in the "Submit" action. In the "Fields setup" field of that item I could specify each array, a pre-defined validation rule, plus the error message in a format like:
ARRAYNAME/RULENAME:MESSAGE
Like this example:
CategoryArray/array_contains_three_elements:You must select a total of THREE projects for this category. Please review your selections.
In C7, the Action Editor no longer includes a "Validate data" item. The "Submit" element in the View Editor also doesn't include this. I did find a "Validate Fields" option under form Settings > Behaviors > Data, but it is not configurable. I assume this only toggles validation on/off for validation definitions available in specific field types under "Behaviors", but the HTML element doesn't include a "Validation" option.
So, how in C7 can I validate the size of a form variable array at form submission?