Skip to content

Commit

Permalink
validation msg
Browse files Browse the repository at this point in the history
  • Loading branch information
spencerrlongg committed Feb 14, 2024
1 parent 72c118a commit d9c61fd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
3 changes: 1 addition & 2 deletions app/Http/Controllers/AssetModelsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,7 @@ public function update(ImageUploadRequest $request, $modelId = null)
$model->fieldset_id = $request->input('fieldset_id');

if ($this->shouldAddDefaultValues($request->input())) {
if (!$this->assignCustomFieldsDefaultValues($model, $request->input('default_values'))){
//TODO: this needs to return the actual validation errors, will come back to this before opening PR
if ($msg = !$this->assignCustomFieldsDefaultValues($model, $request->input('default_values'))){
return redirect()->back()->withInput()->with('error', trans('admin/custom_fields/message.fieldset_default_value.error'));
}
}
Expand Down
1 change: 1 addition & 0 deletions resources/lang/en-US/validation.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@
'gte' => [
'numeric' => 'Value cannot be negative'
],
'checkboxes' => ':attribute contains invalid options.',


/*
Expand Down

0 comments on commit d9c61fd

Please sign in to comment.