Skip to content
Snippets Groups Projects
Commit 114aaec1 authored by Jozsef Barcza's avatar Jozsef Barcza
Browse files

datetime validation

parent fd61d726
Branches feature/datetime-negative-validation
No related tags found
5 merge requests!130integer data type,!120integer data type,!119Develop to main M25,!117Develop to main M25,!112datetime validation
Pipeline #290199 failed
......@@ -131,7 +131,7 @@ object ValidationUtil extends LogF {
logger.info(s"received data points2: ${timeSeries.timeSeriesDateTime.get.points}")
val inValidDateTimes = timeSeries.timeSeriesDateTime.get.points.foldLeft(List.empty[String]) { (inValid, point) =>
val pValue = point.value.asInstanceOf[String]
if Try(ZonedDateTime.parse(pValue)).isSuccess then inValid else pValue :: inValid
if pValue.nonEmpty && Try(ZonedDateTime.parse(pValue)).isSuccess && pValue.head.isDigit then inValid else pValue :: inValid
}
if (!inValidDateTimes.isEmpty) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment