Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
spencerrlongg committed Feb 14, 2024
1 parent 2524154 commit 72c118a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
7 changes: 3 additions & 4 deletions app/Models/CustomFieldset.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,14 +94,13 @@ public function validation_rules()

array_push($rule, $field->attributes['format']);
$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') {
$rules[$field->db_column_name()][] = 'not_array';
}

if ($field->element == 'checkbox') {
//Log::alert($field->formatFieldValuesAsArray());
$values = $field->formatFieldValuesAsArray();
$rules[$field->db_column_name()][] = 'checkboxes';
}
}
Expand Down
3 changes: 2 additions & 1 deletion app/Providers/ValidationServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,8 @@ public function boot()
if(count($invalid) > 0) {
return false;
}
} else return true;
}
return true;
});
}

Expand Down

0 comments on commit 72c118a

Please sign in to comment.