Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
100.00% covered (success)
100.00%
5 / 5
100.00% covered (success)
100.00%
1 / 1
CRAP
100.00% covered (success)
100.00%
1 / 1
UpdatePromptLanguageRequest
100.00% covered (success)
100.00%
5 / 5
100.00% covered (success)
100.00%
1 / 1
1
100.00% covered (success)
100.00%
1 / 1
 rules
100.00% covered (success)
100.00%
5 / 5
100.00% covered (success)
100.00%
1 / 1
1
1<?php
2
3namespace App\Http\Requests\v2\PromptLanguage;
4
5use App\Http\Requests\v2\Parameter\Concerns\AuthorizesVengresoAdmin;
6use Illuminate\Foundation\Http\FormRequest;
7
8/**
9 * Request for updating an existing prompt language.
10 *
11 * @property string|null $title The language display title
12 * @property string|null $value The language code
13 * @property string|null $prompt The prompt text that instructs the AI on output language
14 */
15class UpdatePromptLanguageRequest extends FormRequest
16{
17    use AuthorizesVengresoAdmin;
18
19    /**
20     * Get the validation rules that apply to the request.
21     *
22     * @return array<string, \Illuminate\Contracts\Validation\ValidationRule|array<mixed>|string>
23     */
24    public function rules(): array
25    {
26        return [
27            'title' => 'sometimes|string|max:255',
28            'value' => 'sometimes|string|max:10',
29            'prompt' => 'sometimes|string',
30        ];
31    }
32}