Files
ticcat/app/Http/Requests/ToDoRequest.php
2024-02-18 23:30:50 +01:00

31 lines
689 B
PHP

<?php
namespace App\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
class ToDoRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*/
public function authorize(): bool
{
return true;
}
/**
* Get the validation rules that apply to the request.
*
* @return array<string, \Illuminate\Contracts\Validation\ValidationRule|array<mixed>|string>
*/
public function rules(): array
{
return [
'name' => ['string', 'min:3', 'max:255'],
'description' => ['string', 'max:2000'],
'checked' => ['boolean', 'nullable'],
];
}
}