Files
sam-api/app/Http/Requests/Approval/UpdateRequest.php

32 lines
719 B
PHP
Raw Normal View History

<?php
namespace App\Http\Requests\Approval;
use Illuminate\Foundation\Http\FormRequest;
class UpdateRequest extends FormRequest
{
public function authorize(): bool
{
return true;
}
public function rules(): array
{
return [
'form_id' => 'nullable|integer|exists:approval_forms,id',
'title' => 'nullable|string|max:200',
'content' => 'nullable|array',
'attachments' => 'nullable|array',
'attachments.*' => 'integer|exists:files,id',
];
}
public function messages(): array
{
return [
'form_id.exists' => __('validation.exists', ['attribute' => '결재양식']),
];
}
}