Update to Kirby 5

This commit is contained in:
Paul Nicoué 2025-07-11 14:41:34 +02:00
parent 5d9979fca8
commit 0fefc5e2e1
472 changed files with 30853 additions and 10301 deletions

View file

@ -125,27 +125,27 @@ return [
$format = $this->time === false ? 'd.m.Y' : 'd.m.Y H:i';
if ($min && $max && $value->isBetween($min, $max) === false) {
throw new Exception([
'key' => 'validation.date.between',
'data' => [
throw new Exception(
key: 'validation.date.between',
data: [
'min' => $min->format($format),
'max' => $max->format($format)
]
]);
} elseif ($min && $value->isMin($min) === false) {
throw new Exception([
'key' => 'validation.date.after',
'data' => [
'date' => $min->format($format),
]
]);
} elseif ($max && $value->isMax($max) === false) {
throw new Exception([
'key' => 'validation.date.before',
'data' => [
'date' => $max->format($format),
]
]);
);
}
if ($min && $value->isMin($min) === false) {
throw new Exception(
key: 'validation.date.after',
data: ['date' => $min->format($format)]
);
}
if ($max && $value->isMax($max) === false) {
throw new Exception(
key: 'validation.date.before',
data: ['date' => $max->format($format)]
);
}
return true;