check if valid date format entered inside the excel import php
try {
Date::excelToDateTimeObject(trim($row[5]))->format('Y-m-d');
} catch (Exception $exception) {
throw ValidationException::withMessages([
'file' => "contains incorrect date format, should be in Y-m-d format"]
]);
}