diff --git a/app/Http/Requests/SystemRegisterRequest.php b/app/Http/Requests/SystemRegisterRequest.php index 6547015..5544e0f 100644 --- a/app/Http/Requests/SystemRegisterRequest.php +++ b/app/Http/Requests/SystemRegisterRequest.php @@ -37,7 +37,7 @@ class SystemRegisterRequest extends FormRequest 'heartbeat' => 'Sorry, only an admin can set this below 12', 'hold' => 'Must be Yes or No', 'pollmode' => 'Must be Hold, Normal or Crash', - 'pkt_msgs' => 'Sorry, only an admin can increase this above 100', + 'pkt_msgs' => 'Sorry, only an admin can increase this above 100 or below 5', ]; } @@ -95,10 +95,10 @@ class SystemRegisterRequest extends FormRequest 'nullable', 'integer', function ($attribute,$value,$fail) { - if (($value > 100) && (! Gate::allows('admin'))) + if ((($value > 100) || ($value < 5)) && (! Gate::allows('admin'))) $fail(true); }, - 'min:5', + 'min:1', 'max:65535', ], ] : []));