Hi,
I see that many validation plugins starts with a code like this:
The problem with this approach is that, in multiple selection items, $data is joined in a single string, and is it almost impossible separate each item to perform some validations for e.g., if more than 3 options were selected (mainly when using the php/regex plugin).
I recommend to remove that part of the code or to change it to:
in order to mantain compatibilty and to be able to explode the string if necessary.
Regards,
Mauro.
I see that many validation plugins starts with a code like this:
PHP:
if (is_array($data)) {
$data = implode('', $data);
}
The problem with this approach is that, in multiple selection items, $data is joined in a single string, and is it almost impossible separate each item to perform some validations for e.g., if more than 3 options were selected (mainly when using the php/regex plugin).
I recommend to remove that part of the code or to change it to:
PHP:
if (is_array($data)) {
$data = implode(GROUPSPLITTER, $data);
}
in order to mantain compatibilty and to be able to explode the string if necessary.
Regards,
Mauro.