Skip to content

A free open source IT asset/license management system

Only accept a positive number for thresholds

snipe5cda7cce4830
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',
];
}
}