Files
muninn/app/Http/Requests/StoreProjectRequest.php
T

26 lines
568 B
PHP
Raw Normal View History

<?php
namespace App\Http\Requests;
use App\Models\Project;
use Illuminate\Foundation\Http\FormRequest;
use Illuminate\Validation\Rule;
class StoreProjectRequest extends FormRequest
{
public function authorize(): bool
{
return true;
}
public function rules(): array
{
return [
'name' => ['required', 'string', 'max:255'],
'description' => ['nullable', 'string'],
'status' => ['required', 'string', Rule::in(Project::STATUSES)],
'due_at' => ['nullable', 'date'],
];
}
}