This commit is contained in:
spencerrlongg 2024-02-14 11:41:46 -06:00
parent 25241542d2
commit 72c118a70f
2 changed files with 5 additions and 5 deletions

View file

@ -94,14 +94,13 @@ class CustomFieldset extends Model
array_push($rule, $field->attributes['format']); array_push($rule, $field->attributes['format']);
$rules[$field->db_column_name()] = $rule; $rules[$field->db_column_name()] = $rule;
// add not_array to rules for all fields
// temporary condition added to fix issue with model default updates in the gui // add not_array to rules for all fields but checkboxes
if ($field->element != 'checkbox') { if ($field->element != 'checkbox') {
$rules[$field->db_column_name()][] = 'not_array'; $rules[$field->db_column_name()][] = 'not_array';
} }
if ($field->element == 'checkbox') { if ($field->element == 'checkbox') {
//Log::alert($field->formatFieldValuesAsArray());
$values = $field->formatFieldValuesAsArray();
$rules[$field->db_column_name()][] = 'checkboxes'; $rules[$field->db_column_name()][] = 'checkboxes';
} }
} }

View file

@ -314,7 +314,8 @@ class ValidationServiceProvider extends ServiceProvider
if(count($invalid) > 0) { if(count($invalid) > 0) {
return false; return false;
} }
} else return true; }
return true;
}); });
} }