Allow admins to reduce the size of pkt_msgs
This commit is contained in:
parent
c9eee48c6a
commit
52961e2403
@ -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',
|
||||
],
|
||||
] : []));
|
||||
|
Loading…
x
Reference in New Issue
Block a user