mirror of
https://github.com/pterodactyl/panel.git
synced 2026-11-30 11:25:52 -05:00
Co-authored-by: Anthony <anthony@infraly.co> Co-authored-by: Sky Mulley <daniel.mulley@outlook.com>
32 lines
927 B
PHP
32 lines
927 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Pterodactyl\Validation;
|
|
|
|
final class ScheduleRules
|
|
{
|
|
/**
|
|
* Validation rules for the client schedule requests.
|
|
*
|
|
* @return NormalizedValidationRules
|
|
*/
|
|
public static function rules(): array
|
|
{
|
|
return [
|
|
'server_id' => ['required', 'exists:servers,id'],
|
|
'name' => ['required', 'string', 'max:191'],
|
|
'cron_day_of_week' => ['required', 'string'],
|
|
'cron_month' => ['required', 'string'],
|
|
'cron_day_of_month' => ['required', 'string'],
|
|
'cron_hour' => ['required', 'string'],
|
|
'cron_minute' => ['required', 'string'],
|
|
'is_active' => ['boolean'],
|
|
'is_processing' => ['boolean'],
|
|
'only_when_online' => ['boolean'],
|
|
'last_run_at' => ['nullable', 'date'],
|
|
'next_run_at' => ['nullable', 'date'],
|
|
];
|
|
}
|
|
}
|