1
0
mirror of https://github.com/typemill/typemill.git synced 2025-07-31 03:10:19 +02:00

Changed data for customfields, fixed empty image in image component, fixed validation checkboxlist

This commit is contained in:
trendschau
2020-11-05 21:09:34 +01:00
parent 361c5a23fc
commit 4477b61111
5 changed files with 94 additions and 33 deletions

View File

@@ -419,13 +419,17 @@ class Validation
$v->rule('in', $fieldName, $fieldDefinitions['options']);
break;
case "checkboxlist":
/* create array with option keys as value */
$options = array();
foreach($fieldDefinitions['options'] as $key => $value){ $options[] = $key; }
/* loop over input values and check, if the options of the field definitions (options for checkboxlist) contains the key (input from user, key is used as value, value is used as label) */
foreach($fieldValue as $key => $value)
if(isset($fieldValue) && is_array($fieldValue))
{
$v->rule('in', $key, $options);
/* create array with option keys as value */
$options = array();
foreach($fieldDefinitions['options'] as $key => $value){ $options[] = $key; }
/* loop over input values and check, if the options of the field definitions (options for checkboxlist) contains the key (input from user, key is used as value, value is used as label) */
foreach($fieldValue as $key => $value)
{
$v->rule('in', $key, $options);
}
}
break;
case "color":