<?php

namespace App\Http\Requests\Api\V1\Client\Games;

use Illuminate\Foundation\Http\FormRequest;

class CheckWordlingGameRequest extends FormRequest
{
    public function authorize()
    {
        return true;
    }

    public function rules()
    {
        return [
            'user_input_word' => 'required|string|max:20',
            'game_id' => 'nullable|exists:wordling_words,game_id',
            'game_date' => 'nullable|date',
            'game_type' => 'required|string|in:wordling_main,wordling_min,wordling_max',
        ];
    }
}
