update validasi date terminated

This commit is contained in:
2023-05-17 11:35:40 +07:00
parent 3f40170043
commit a10fa9db21

View File

@@ -474,13 +474,15 @@ class MemberEnrollmentService
]), 0, null, $row);
}
if (empty($row['date_terminated'])) {
throw new ImportRowException(__('enrollment.DATE_OF_TERMINATED'), 0, null, $row);
}
if(!$this->validateDate($row['date_terminated'])){
throw new ImportRowException(__('enrollment.INVALID_DATE', [
'title' => $title['date_terminated']
]), 0, null, $row);
// if (empty($row['date_terminated'])) {
// throw new ImportRowException(__('enrollment.DATE_OF_TERMINATED'), 0, null, $row);
// }
if (!empty($row['date_terminated'])) {
if(!$this->validateDate($row['date_terminated'])){
throw new ImportRowException(__('enrollment.INVALID_DATE', [
'title' => $title['date_terminated']
]), 0, null, $row);
}
}
// TODO DOB FORMAT VALIDATION