I have a dbjoin element set to use checkboxes.
Regardless which validation plugin I try to use, the validation plugin seems to prevent the checkbox from being checked (or unchecked).
After the first checkbox is checked, you have to click any checkbox twice before the desired check/uncheck actually works.
Trying to debug this (using the php validation plugin), by sending the $data and {placeholder} values to the php error log - it looks like the validation is being run twice. For every click on a checkbox there are 2 entries in the error_log and the $data value is always a single array element while the placeholder is a string (the last option value checked).
And since both the $data array or {placeholder} will always return a single value - there is no way to check for how many checkboxes are checked, nor the array of values selected.
In other words, attempts at validation is pretty much worthless - except for maybe the 'not empty' validation.
It seems to me that for any validations on any multiselect elements you would need to include the array of the currently checked or selected values back to the server with the ajax call - since it appears that back on the server all php 'knows' is the original value from when the element was last loaded into the form. Or maybe, besides the $data array, you need a '$fluid_data' array for any multiselect elements just to track that?
At any rate, I don't think I've ever been able to use validations on a multiselect element that worked as expected.
Regardless which validation plugin I try to use, the validation plugin seems to prevent the checkbox from being checked (or unchecked).
After the first checkbox is checked, you have to click any checkbox twice before the desired check/uncheck actually works.
Trying to debug this (using the php validation plugin), by sending the $data and {placeholder} values to the php error log - it looks like the validation is being run twice. For every click on a checkbox there are 2 entries in the error_log and the $data value is always a single array element while the placeholder is a string (the last option value checked).
And since both the $data array or {placeholder} will always return a single value - there is no way to check for how many checkboxes are checked, nor the array of values selected.
In other words, attempts at validation is pretty much worthless - except for maybe the 'not empty' validation.
It seems to me that for any validations on any multiselect elements you would need to include the array of the currently checked or selected values back to the server with the ajax call - since it appears that back on the server all php 'knows' is the original value from when the element was last loaded into the form. Or maybe, besides the $data array, you need a '$fluid_data' array for any multiselect elements just to track that?
At any rate, I don't think I've ever been able to use validations on a multiselect element that worked as expected.