Add citas module: scheduling, calendar, blocked schedules
This commit is contained in:
31
app/Http/Requests/HorarioBloqueadoRequest.php
Normal file
31
app/Http/Requests/HorarioBloqueadoRequest.php
Normal file
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class HorarioBloqueadoRequest extends FormRequest
|
||||
{
|
||||
public function authorize(): bool
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public function rules(): array
|
||||
{
|
||||
return [
|
||||
'fecha' => ['required', 'date'],
|
||||
'hora_inicio' => ['required', 'date_format:H:i'],
|
||||
'hora_fin' => ['required', 'date_format:H:i', 'after:hora_inicio'],
|
||||
'motivo' => ['nullable', 'string', 'max:255'],
|
||||
'activo' => ['nullable', 'boolean'],
|
||||
];
|
||||
}
|
||||
|
||||
public function messages(): array
|
||||
{
|
||||
return [
|
||||
'hora_fin.after' => 'La hora de fin debe ser posterior a la hora de inicio.',
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user