feat: derive autoresponder schedule from backend
This commit is contained in:
@@ -53,7 +53,7 @@ final class RuleValidator
|
||||
{
|
||||
$value = trim($value);
|
||||
if ($mode === 'exact_hour') {
|
||||
if (!preg_match('/^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:00$/', $value)) {
|
||||
if (!preg_match('/^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}$/', $value)) {
|
||||
throw new InvalidArgumentException('Nieprawidłowa data lub godzina.');
|
||||
}
|
||||
$dt = DateTimeImmutable::createFromFormat('!Y-m-d\TH:i', $value, $tz);
|
||||
|
||||
Reference in New Issue
Block a user