Browse Source

Minor alternate ID validation fixes

master
Preyea Regmi 5 years ago
parent
commit
052b54ebb8
  1. 28
      app/src/main/java/com/gmeremit/online/gmeremittance_native/kycV3/presenter/KYCV3ViewModel.java

28
app/src/main/java/com/gmeremit/online/gmeremittance_native/kycV3/presenter/KYCV3ViewModel.java

@ -848,8 +848,11 @@ public class KYCV3ViewModel extends BaseViewModel implements KYCV3PresenterInter
if (selectedIdTypeId == null || selectedIdTypeId.length() == 0)
return true;
else
else {
selectedIdType = kycRelatedDataDTO.getSelectedIdTYpeFromId(selectedIdTypeId).getText();
customerDetailErrorLiveDataDTO.setValueToAnotherIdNoError(null);
}
if (ID_TYPE_NATIONAL_ID_CARD.equalsIgnoreCase(selectedIdType)) {
@ -860,6 +863,11 @@ public class KYCV3ViewModel extends BaseViewModel implements KYCV3PresenterInter
customerDetailErrorLiveDataDTO.setValueToAnotherIdNoError("Invalid National Id Card");
result = false;
}
else
{
customerDetailErrorLiveDataDTO.setValueToAnotherIdNoError(null);
}
}
log(selectedIdType + " result: " + result);
} else if (ID_TYPE_ALIEN_REGISTRATION_CARD.equalsIgnoreCase(selectedIdType)) {
@ -873,6 +881,11 @@ public class KYCV3ViewModel extends BaseViewModel implements KYCV3PresenterInter
customerDetailErrorLiveDataDTO.setValueToAnotherIdNoError("Invalid Alien Id Card");
result = false;
}
else
{
customerDetailErrorLiveDataDTO.setValueToAnotherIdNoError(null);
}
}
log(selectedIdType + " result: " + result);
} else if (ID_TYPE_DRIVING_LICENSE.equalsIgnoreCase(selectedIdType)) {
@ -885,6 +898,11 @@ public class KYCV3ViewModel extends BaseViewModel implements KYCV3PresenterInter
customerDetailErrorLiveDataDTO.setValueToAnotherIdNoError("Invalid Driving License Card");
result = false;
}
else
{
customerDetailErrorLiveDataDTO.setValueToAnotherIdNoError(null);
}
}
log(selectedIdType + " result: " + result);
} else if (ID_TYPE_PASSPORT.equalsIgnoreCase(selectedIdType)) {
@ -897,20 +915,22 @@ public class KYCV3ViewModel extends BaseViewModel implements KYCV3PresenterInter
customerDetailErrorLiveDataDTO.setValueToAnotherIdNoError("Invalid Passport");
result = false;
}
else
{
customerDetailErrorLiveDataDTO.setValueToAnotherIdNoError(null);
}
}
log(selectedIdType + " result: " + result);
}
else
{
log(selectedIdType + " could not be mapped to \n"+ID_TYPE_ALIEN_REGISTRATION_CARD+"\n"+ID_TYPE_NATIONAL_ID_CARD+"\n"+ID_TYPE_DRIVING_LICENSE+"\n"+ID_TYPE_PASSPORT);
customerDetailErrorLiveDataDTO.setValueToAnotherIdNoError(null);
result=false;
}
view.getCustomerDetailViewContract().enableAlternateIdFocusChangeAndImeOptionListener(result);
if(result)
customerDetailErrorLiveDataDTO.setValueToAnotherIdNoError(null);
return result;
}

Loading…
Cancel
Save