Path: blob/1.0-develop/app/Http/Requests/Admin/Settings/AdvancedSettingsFormRequest.php
10277 views
<?php12namespace Pterodactyl\Http\Requests\Admin\Settings;34use Pterodactyl\Http\Requests\Admin\AdminFormRequest;56class AdvancedSettingsFormRequest extends AdminFormRequest7{8/**9* Return all the rules to apply to this request's data.10*/11public function rules(): array12{13return [14'recaptcha:enabled' => 'required|in:true,false',15'recaptcha:secret_key' => 'required|string|max:191',16'recaptcha:website_key' => 'required|string|max:191',17'pterodactyl:guzzle:timeout' => 'required|integer|between:1,60',18'pterodactyl:guzzle:connect_timeout' => 'required|integer|between:1,60',19'pterodactyl:client_features:allocations:enabled' => 'required|in:true,false',20'pterodactyl:client_features:allocations:range_start' => [21'nullable',22'required_if:pterodactyl:client_features:allocations:enabled,true',23'integer',24'between:1024,65535',25],26'pterodactyl:client_features:allocations:range_end' => [27'nullable',28'required_if:pterodactyl:client_features:allocations:enabled,true',29'integer',30'between:1024,65535',31'gt:pterodactyl:client_features:allocations:range_start',32],33];34}3536public function attributes(): array37{38return [39'recaptcha:enabled' => 'reCAPTCHA Enabled',40'recaptcha:secret_key' => 'reCAPTCHA Secret Key',41'recaptcha:website_key' => 'reCAPTCHA Website Key',42'pterodactyl:guzzle:timeout' => 'HTTP Request Timeout',43'pterodactyl:guzzle:connect_timeout' => 'HTTP Connection Timeout',44'pterodactyl:client_features:allocations:enabled' => 'Auto Create Allocations Enabled',45'pterodactyl:client_features:allocations:range_start' => 'Starting Port',46'pterodactyl:client_features:allocations:range_end' => 'Ending Port',47];48}49}505152