From 5cda7cce4830626f594de8cb4d4291c161916351 Mon Sep 17 00:00:00 2001 From: snipe Date: Wed, 9 Oct 2024 18:21:40 +0100 Subject: [PATCH] Only accept a positive number for thresholds Signed-off-by: snipe --- app/Http/Requests/StoreNotificationSettings.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/app/Http/Requests/StoreNotificationSettings.php b/app/Http/Requests/StoreNotificationSettings.php index 37034732f8..b365b00c9d 100644 --- a/app/Http/Requests/StoreNotificationSettings.php +++ b/app/Http/Requests/StoreNotificationSettings.php @@ -26,11 +26,11 @@ class StoreNotificationSettings extends FormRequest return [ 'alert_email' => 'email_array|nullable', 'admin_cc_email' => 'email|nullable', - 'alert_threshold' => 'numeric|nullable', - 'alert_interval' => 'numeric|nullable', - 'audit_warning_days' => 'numeric|nullable', - 'due_checkin_days' => 'numeric|nullable', - 'audit_interval' => 'numeric|nullable', + 'alert_threshold' => 'numeric|nullable|gt:0', + 'alert_interval' => 'numeric|nullable|gt:0', + 'audit_warning_days' => 'numeric|nullable|gt:0', + 'due_checkin_days' => 'numeric|nullable|gt:0', + 'audit_interval' => 'numeric|nullable|gt:0', ]; } }