<?php

namespace App\Http\Requests\Api\V1\Auth;

use App\Rules\VerificationRule;
use Illuminate\Foundation\Http\FormRequest;

class AuthVerifyRequest extends FormRequest
{
    /**
     * Get the validation rules that apply to the request.
     *
     * @return array<string, \Illuminate\Contracts\Validation\ValidationRule|array|string>
     */
    public function rules(): array
    {
        return [
            /**
             * @example 61929248
             */
            'phone_number' => ['required', 'integer', 'between:61000000,65999999'],

            /**
             * @example 99934
             */
            'code' => ['required', 'integer', new VerificationRule($this->phone_number)],
        ];
    }
}
