I have a multi-select dropdown in my confiforms form. I need to validate that it isn't empty when submitting the form.
Neither of these rules validate that in the rules macro as I'm able to submit the form:
MyList.asSize:0
MyList.asSize:<1
How can I validate that at least 1 selection was made.
!MyList:[empty]
But of course you need to have the validation rule that checks for "erroring condition", so it needs to be
MyList:[empty]
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks @Alex Medved _ConfiForms_ .
The validation works but a strange quirk shows up. There is only one validation rules macro. But the validation error message from it shows up twice on the top of the form. Any idea why that is and how to prevent it?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Do you have multiple validation rules?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
There is only one rule. But two conditions in the same rule. The error message is "MyList is required".
I did a test by making a change to the message and the new message showed up twice.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Remove the value from the "Field name" parameter
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks. That fixed it. I overlooked the info under the field name param "leave blank when you configure validation rules, as these rules are applied on form submit"
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
We should also make this work better in this case... (ignoring the parameter altogether - will make a note)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.