fix required validation for <et2-select multiple and it's custom-field equivalent

This commit is contained in:
ralf 2024-03-15 13:26:50 +02:00
parent 7c027ad41f
commit dbf77cb004

View File

@ -269,7 +269,7 @@ class Select extends Etemplate\Widget
}
}
}
if ($ok && $value === '' && $this->required)
if ($ok && $this->required && ((string)$value === '' || is_array($value) && !$value))
{
self::set_validation_error($form_name,lang('Field must not be empty !!!',$value),'');
}