Path: blob/1.0-develop/app/Http/Requests/Auth/LoginCheckpointRequest.php
10266 views
<?php12namespace Pterodactyl\Http\Requests\Auth;34use Illuminate\Validation\Rule;5use Illuminate\Foundation\Http\FormRequest;67class LoginCheckpointRequest extends FormRequest8{9/**10* Determine if the request is authorized.11*/12public function authorize(): bool13{14return true;15}1617/**18* Rules to apply to the request.19*/20public function rules(): array21{22return [23'confirmation_token' => 'required|string',24'authentication_code' => [25'nullable',26'numeric',27Rule::requiredIf(function () {28return empty($this->input('recovery_token'));29}),30],31'recovery_token' => [32'nullable',33'string',34Rule::requiredIf(function () {35return empty($this->input('authentication_code'));36}),37],38];39}40}414243