43 lines
1.0 KiB
PHP
43 lines
1.0 KiB
PHP
|
|
<?php
|
||
|
|
|
||
|
|
namespace App\Http\Requests\Roadmap;
|
||
|
|
|
||
|
|
use Illuminate\Foundation\Http\FormRequest;
|
||
|
|
|
||
|
|
class UpdateMilestoneRequest extends FormRequest
|
||
|
|
{
|
||
|
|
public function authorize(): bool
|
||
|
|
{
|
||
|
|
return true;
|
||
|
|
}
|
||
|
|
|
||
|
|
public function rules(): array
|
||
|
|
{
|
||
|
|
return [
|
||
|
|
'title' => 'required|string|max:255',
|
||
|
|
'description' => 'nullable|string|max:2000',
|
||
|
|
'due_date' => 'nullable|date',
|
||
|
|
'assignee_id' => 'nullable|integer|exists:users,id',
|
||
|
|
'sort_order' => 'nullable|integer',
|
||
|
|
];
|
||
|
|
}
|
||
|
|
|
||
|
|
public function attributes(): array
|
||
|
|
{
|
||
|
|
return [
|
||
|
|
'title' => '마일스톤 제목',
|
||
|
|
'description' => '설명',
|
||
|
|
'due_date' => '예정일',
|
||
|
|
'assignee_id' => '담당자',
|
||
|
|
];
|
||
|
|
}
|
||
|
|
|
||
|
|
public function messages(): array
|
||
|
|
{
|
||
|
|
return [
|
||
|
|
'title.required' => '마일스톤 제목은 필수입니다.',
|
||
|
|
'title.max' => '마일스톤 제목은 최대 255자까지 입력 가능합니다.',
|
||
|
|
];
|
||
|
|
}
|
||
|
|
}
|