Skip to content

Commit 8d0c88d

Browse files
authored
Merge pull request #18116 from akemidx/auditwarningthreshold
Fixed #17329 Audit Warning Threshold could be negative
2 parents 07256fd + acb5309 commit 8d0c88d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

app/Http/Requests/StoreNotificationSettings.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public function rules(): array
3232
],
3333
'alert_threshold' => 'numeric|nullable',
3434
'alert_interval' => 'numeric|nullable|gt:0',
35-
'audit_warning_days' => 'numeric|nullable',
35+
'audit_warning_days' => 'numeric|nullable|gte:0',
3636
'due_checkin_days' => 'numeric|nullable|gt:0',
3737
'audit_interval' => 'numeric|nullable|gt:0',
3838
];

resources/views/settings/alerts.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@
183183
<label for="audit_warning_days">{{ trans('admin/settings/general.audit_warning_days') }}</label>
184184
</div>
185185
<div class="input-group col-xs-10 col-sm-6 col-md-4 col-lg-3 col-xl-3">
186-
<input class="form-control" placeholder="14" maxlength="3" name="audit_warning_days" type="number" id="audit_warning_days" value="{{ old('audit_warning_days', $setting->audit_warning_days) }}">
186+
<input class="form-control" placeholder="14" maxlength="3" min="0" name="audit_warning_days" type="number" id="audit_warning_days" value="{{ old('audit_warning_days', $setting->audit_warning_days) }}">
187187
<span class="input-group-addon">{{ trans('general.days') }}</span>
188188
</div>
189189
<div class="col-md-8 col-md-offset-3">

0 commit comments

Comments
 (0)