26 lines
755 B
PHP
26 lines
755 B
PHP
<?php
|
|
|
|
namespace App\Http\Requests;
|
|
|
|
use Illuminate\Foundation\Http\FormRequest;
|
|
|
|
class UpdateEventRequest extends FormRequest
|
|
{
|
|
public function authorize(): bool
|
|
{
|
|
return true;
|
|
}
|
|
|
|
public function rules(): array
|
|
{
|
|
return [
|
|
'title' => ['sometimes', 'required', 'string', 'max:255'],
|
|
'date' => ['sometimes', 'required', 'date_format:Y-m-d'],
|
|
'emotion' => ['sometimes', 'required', 'numeric', 'min:-1', 'max:1'],
|
|
'customColor' => ['nullable', 'string', 'max:20'],
|
|
'gradientPreset' => ['nullable', 'integer', 'min:0', 'max:9'],
|
|
'image' => ['nullable', 'string', 'max:500'],
|
|
'note' => ['nullable', 'string', 'max:5000'],
|
|
];
|
|
}
|
|
}
|