From 6588d409b85a22727ba20c0c698c15713d8edbb5 Mon Sep 17 00:00:00 2001 From: Marcus Moore Date: Wed, 28 May 2025 14:45:03 -0700 Subject: [PATCH] Add validation --- app/Http/Requests/StoreLabelSettings.php | 4 ++-- resources/views/settings/labels.blade.php | 8 +------- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/app/Http/Requests/StoreLabelSettings.php b/app/Http/Requests/StoreLabelSettings.php index f9ede7ea89..2b6fd83c6f 100644 --- a/app/Http/Requests/StoreLabelSettings.php +++ b/app/Http/Requests/StoreLabelSettings.php @@ -37,8 +37,8 @@ class StoreLabelSettings extends FormRequest return [ 'labels_per_page' => 'numeric', - 'labels_width' => 'numeric', - 'labels_height' => 'numeric', + 'labels_width' => 'numeric|min:0.1', + 'labels_height' => 'numeric|min:0.1', 'labels_pmargin_left' => 'numeric|nullable', 'labels_pmargin_right' => 'numeric|nullable', 'labels_pmargin_top' => 'numeric|nullable', diff --git a/resources/views/settings/labels.blade.php b/resources/views/settings/labels.blade.php index b922eb95e2..8af236d625 100644 --- a/resources/views/settings/labels.blade.php +++ b/resources/views/settings/labels.blade.php @@ -426,15 +426,13 @@
{{ trans('admin/settings/general.width_w') }}
+ {!! $errors->first('labels_width', '') !!}
{{ trans('admin/settings/general.height_h') }}
-
-
- {!! $errors->first('labels_width', '') !!} {!! $errors->first('labels_height', '') !!}
@@ -486,10 +484,6 @@ -
- {!! $errors->first('labels_width', '') !!} - {!! $errors->first('labels_height', '') !!} -