Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
pterodactyl
GitHub Repository: pterodactyl/panel
Path: blob/1.0-develop/app/Http/Requests/Admin/Settings/AdvancedSettingsFormRequest.php
10277 views
1
<?php
2
3
namespace Pterodactyl\Http\Requests\Admin\Settings;
4
5
use Pterodactyl\Http\Requests\Admin\AdminFormRequest;
6
7
class AdvancedSettingsFormRequest extends AdminFormRequest
8
{
9
/**
10
* Return all the rules to apply to this request's data.
11
*/
12
public function rules(): array
13
{
14
return [
15
'recaptcha:enabled' => 'required|in:true,false',
16
'recaptcha:secret_key' => 'required|string|max:191',
17
'recaptcha:website_key' => 'required|string|max:191',
18
'pterodactyl:guzzle:timeout' => 'required|integer|between:1,60',
19
'pterodactyl:guzzle:connect_timeout' => 'required|integer|between:1,60',
20
'pterodactyl:client_features:allocations:enabled' => 'required|in:true,false',
21
'pterodactyl:client_features:allocations:range_start' => [
22
'nullable',
23
'required_if:pterodactyl:client_features:allocations:enabled,true',
24
'integer',
25
'between:1024,65535',
26
],
27
'pterodactyl:client_features:allocations:range_end' => [
28
'nullable',
29
'required_if:pterodactyl:client_features:allocations:enabled,true',
30
'integer',
31
'between:1024,65535',
32
'gt:pterodactyl:client_features:allocations:range_start',
33
],
34
];
35
}
36
37
public function attributes(): array
38
{
39
return [
40
'recaptcha:enabled' => 'reCAPTCHA Enabled',
41
'recaptcha:secret_key' => 'reCAPTCHA Secret Key',
42
'recaptcha:website_key' => 'reCAPTCHA Website Key',
43
'pterodactyl:guzzle:timeout' => 'HTTP Request Timeout',
44
'pterodactyl:guzzle:connect_timeout' => 'HTTP Connection Timeout',
45
'pterodactyl:client_features:allocations:enabled' => 'Auto Create Allocations Enabled',
46
'pterodactyl:client_features:allocations:range_start' => 'Starting Port',
47
'pterodactyl:client_features:allocations:range_end' => 'Ending Port',
48
];
49
}
50
}
51
52