Teren-app/app/Http/Requests/UpdateSegmentRequest.php
Simon Pocrnjič 872b76b012 changes
2025-10-20 19:39:26 +02:00

31 lines
605 B
PHP

<?php
namespace App\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
class UpdateSegmentRequest extends FormRequest
{
public function authorize(): bool
{
return true;
}
public function rules(): array
{
return [
'name' => ['required', 'string', 'max:50'],
'description' => ['nullable', 'string', 'max:255'],
'active' => ['boolean'],
'exclude' => ['boolean']
];
}
public function messages(): array
{
return [
'name.required' => 'Name is required.',
];
}
}