Files
test_bellis/laravel/app/Http/Requests/UpdateTaskRequest.php
2026-02-18 19:54:52 +07:00

33 lines
827 B
PHP

<?php
namespace App\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
class UpdateTaskRequest 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 [
'title' => ['sometimes', 'required', 'string', 'max:200'],
'is_done' => ['sometimes', 'boolean'],
'due_at' => ['nullable', 'date', 'date_format:Y-m-d\TH:i:s\Z'],
'tags' => ['nullable', 'array'],
'tags.*' => ['string', 'max:50'],
];
}
}