Files
SkinbaseNova/.deploy/artwork-evolution-release/app/Http/Requests/Posts/CreateCommentRequest.php
2026-04-18 17:02:56 +02:00

28 lines
517 B
PHP

<?php
namespace App\Http\Requests\Posts;
use Illuminate\Foundation\Http\FormRequest;
class CreateCommentRequest extends FormRequest
{
public function authorize(): bool
{
return (bool) $this->user();
}
public function rules(): array
{
return [
'body' => ['required', 'string', 'min:1', 'max:1000'],
];
}
public function messages(): array
{
return [
'body.max' => 'Comment cannot exceed 1,000 characters.',
];
}
}