Skip to content

Commit 8299ee8

Browse files
committed
Fix error in validation of datetime
1 parent 3fbf583 commit 8299ee8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Type/DatetimeType.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,6 @@ private function isValidDatetime(string $value): bool
3838
$date = DateTime::createFromFormat($this->datetimeFormat, $value, new DateTimeZone($this->datetimeZone));
3939
$errors = DateTime::getLastErrors();
4040

41-
return $date && !$errors;
41+
return $date && (!$errors || $errors['warning_count'] === 0 && $errors['error_count'] === 0);
4242
}
4343
}

0 commit comments

Comments
 (0)