2017-12-15 03:05:26 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace Pterodactyl\Http\Requests\Admin\Settings;
|
|
|
|
|
|
|
|
use Pterodactyl\Http\Requests\Admin\AdminFormRequest;
|
|
|
|
|
|
|
|
class AdvancedSettingsFormRequest extends AdminFormRequest
|
|
|
|
{
|
|
|
|
/**
|
2022-10-14 16:59:20 +00:00
|
|
|
* Return all the rules to apply to this request's data.
|
2017-12-15 03:05:26 +00:00
|
|
|
*/
|
2022-10-14 16:59:20 +00:00
|
|
|
public function rules(): array
|
2017-12-15 03:05:26 +00:00
|
|
|
{
|
|
|
|
return [
|
|
|
|
'recaptcha:enabled' => 'required|in:true,false',
|
2020-09-26 23:29:26 +00:00
|
|
|
'recaptcha:secret_key' => 'required|string|max:191',
|
|
|
|
'recaptcha:website_key' => 'required|string|max:191',
|
2017-12-15 03:05:26 +00:00
|
|
|
'pterodactyl:guzzle:timeout' => 'required|integer|between:1,60',
|
|
|
|
'pterodactyl:guzzle:connect_timeout' => 'required|integer|between:1,60',
|
2020-10-31 21:58:15 +00:00
|
|
|
'pterodactyl:client_features:allocations:enabled' => 'required|in:true,false',
|
2021-02-18 05:11:23 +00:00
|
|
|
'pterodactyl:client_features:allocations:range_start' => [
|
|
|
|
'nullable',
|
|
|
|
'required_if:pterodactyl:client_features:allocations:enabled,true',
|
|
|
|
'integer',
|
|
|
|
'between:1024,65535',
|
|
|
|
],
|
|
|
|
'pterodactyl:client_features:allocations:range_end' => [
|
|
|
|
'nullable',
|
|
|
|
'required_if:pterodactyl:client_features:allocations:enabled,true',
|
|
|
|
'integer',
|
|
|
|
'between:1024,65535',
|
|
|
|
'gt:pterodactyl:client_features:allocations:range_start',
|
|
|
|
],
|
2017-12-15 03:05:26 +00:00
|
|
|
];
|
|
|
|
}
|
|
|
|
|
2022-10-14 16:59:20 +00:00
|
|
|
public function attributes(): array
|
2017-12-15 03:05:26 +00:00
|
|
|
{
|
|
|
|
return [
|
|
|
|
'recaptcha:enabled' => 'reCAPTCHA Enabled',
|
|
|
|
'recaptcha:secret_key' => 'reCAPTCHA Secret Key',
|
|
|
|
'recaptcha:website_key' => 'reCAPTCHA Website Key',
|
|
|
|
'pterodactyl:guzzle:timeout' => 'HTTP Request Timeout',
|
|
|
|
'pterodactyl:guzzle:connect_timeout' => 'HTTP Connection Timeout',
|
2020-10-31 21:58:15 +00:00
|
|
|
'pterodactyl:client_features:allocations:enabled' => 'Auto Create Allocations Enabled',
|
|
|
|
'pterodactyl:client_features:allocations:range_start' => 'Starting Port',
|
|
|
|
'pterodactyl:client_features:allocations:range_end' => 'Ending Port',
|
2017-12-15 03:05:26 +00:00
|
|
|
];
|
|
|
|
}
|
|
|
|
}
|