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

25 lines
543 B
PHP
Raw Normal View History

<?php
namespace App\Http\Requests;
use App\Models\TaskComment;
use Illuminate\Foundation\Http\FormRequest;
use Illuminate\Validation\Rule;
class StoreTaskCommentRequest extends FormRequest
{
public function authorize(): bool
{
return true;
}
public function rules(): array
{
return [
'body' => ['required', 'string'],
'author_type' => ['required', 'string', Rule::in(TaskComment::AUTHOR_TYPES)],
'author_name' => ['nullable', 'string', 'max:255'],
];
}
}