Skip to content

A free open source IT asset/license management system

validation msg

spencerrlonggd9c61fdb025e
diff --git a/app/Http/Controllers/AssetModelsController.php b/app/Http/Controllers/AssetModelsController.php
index 455fc82491..34f12b826b 100755
--- a/app/Http/Controllers/AssetModelsController.php
+++ b/app/Http/Controllers/AssetModelsController.php
@@ -169,8 +169,7 @@ class AssetModelsController extends Controller
$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'));
}
}
diff --git a/resources/lang/en-US/validation.php b/resources/lang/en-US/validation.php
index 1c6ad8a148..98084afcd4 100644
--- a/resources/lang/en-US/validation.php
+++ b/resources/lang/en-US/validation.php
@@ -105,6 +105,7 @@ return [
'gte' => [
'numeric' => 'Value cannot be negative'
],
+ 'checkboxes' => ':attribute contains invalid options.',
/*