Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
100.00% covered (success)
100.00%
4 / 4
100.00% covered (success)
100.00%
1 / 1
CRAP
100.00% covered (success)
100.00%
1 / 1
StorePromptLengthOfPostRequest
100.00% covered (success)
100.00%
4 / 4
100.00% covered (success)
100.00%
1 / 1
1
100.00% covered (success)
100.00%
1 / 1
 rules
100.00% covered (success)
100.00%
4 / 4
100.00% covered (success)
100.00%
1 / 1
1
1<?php
2
3namespace App\Http\Requests\v2\PromptLengthOfPost;
4
5use App\Http\Requests\v2\Parameter\Concerns\AuthorizesVengresoAdmin;
6use Illuminate\Foundation\Http\FormRequest;
7
8/**
9 * Request for creating a new prompt length of post.
10 *
11 * @property string $name The length name (e.g., "Short", "Medium", "Long")
12 * @property string $prompt The prompt text that instructs the AI on target word count
13 */
14class StorePromptLengthOfPostRequest extends FormRequest
15{
16    use AuthorizesVengresoAdmin;
17
18    /**
19     * Get the validation rules that apply to the request.
20     *
21     * @return array<string, \Illuminate\Contracts\Validation\ValidationRule|array<mixed>|string>
22     */
23    public function rules(): array
24    {
25        return [
26            'name' => 'required|string|max:255',
27            'prompt' => 'required|string',
28        ];
29    }
30}