|
@ -341,6 +341,8 @@ public class KYCV3ViewModel extends BaseViewModel implements KYCV3PresenterInter |
|
|
args -> |
|
|
args -> |
|
|
{ |
|
|
{ |
|
|
boolean result = ((boolean) args[0]) && ((boolean) args[1]) && ((boolean) args[2]) && ((boolean) args[3]) && ((boolean) args[4]); |
|
|
boolean result = ((boolean) args[0]) && ((boolean) args[1]) && ((boolean) args[2]) && ((boolean) args[3]) && ((boolean) args[4]); |
|
|
|
|
|
Log.d(TAG, "Form 2 valid: " + result); |
|
|
|
|
|
|
|
|
customerDetailForm2Button.setValue(result); |
|
|
customerDetailForm2Button.setValue(result); |
|
|
log("Alternate ID Related Field Valid : " + ((boolean) args[3])); |
|
|
log("Alternate ID Related Field Valid : " + ((boolean) args[3])); |
|
|
log("Passport Related Field Valid : " + ((boolean) args[4])); |
|
|
log("Passport Related Field Valid : " + ((boolean) args[4])); |
|
@ -810,6 +812,8 @@ public class KYCV3ViewModel extends BaseViewModel implements KYCV3PresenterInter |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public boolean validateBankAccountNo(String bankAccNo) { |
|
|
public boolean validateBankAccountNo(String bankAccNo) { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (kycRelatedDataDTO.getPrimaryInformation() == null) |
|
|
if (kycRelatedDataDTO.getPrimaryInformation() == null) |
|
|
kycRelatedDataDTO.setPrimaryInformation(new PrimaryInformationDTO()); |
|
|
kycRelatedDataDTO.setPrimaryInformation(new PrimaryInformationDTO()); |
|
|
|
|
|
|
|
@ -827,6 +831,8 @@ public class KYCV3ViewModel extends BaseViewModel implements KYCV3PresenterInter |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public boolean validatePassportNo(String passportNo) { |
|
|
public boolean validatePassportNo(String passportNo) { |
|
|
|
|
|
if (validator.getKycRelatedDataDTO().isUserOfKoreanNative()) |
|
|
|
|
|
return true; |
|
|
|
|
|
|
|
|
if (kycRelatedDataDTO.getPrimaryInformation() == null) |
|
|
if (kycRelatedDataDTO.getPrimaryInformation() == null) |
|
|
kycRelatedDataDTO.setPrimaryInformation(new PrimaryInformationDTO()); |
|
|
kycRelatedDataDTO.setPrimaryInformation(new PrimaryInformationDTO()); |
|
@ -846,6 +852,8 @@ public class KYCV3ViewModel extends BaseViewModel implements KYCV3PresenterInter |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public boolean validatePassportIssuedDate(String passportIssuedDate) { |
|
|
public boolean validatePassportIssuedDate(String passportIssuedDate) { |
|
|
|
|
|
if (validator.getKycRelatedDataDTO().isUserOfKoreanNative()) |
|
|
|
|
|
return true; |
|
|
|
|
|
|
|
|
if (kycRelatedDataDTO.getPrimaryInformation() == null) |
|
|
if (kycRelatedDataDTO.getPrimaryInformation() == null) |
|
|
kycRelatedDataDTO.setPrimaryInformation(new PrimaryInformationDTO()); |
|
|
kycRelatedDataDTO.setPrimaryInformation(new PrimaryInformationDTO()); |
|
@ -864,6 +872,8 @@ public class KYCV3ViewModel extends BaseViewModel implements KYCV3PresenterInter |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public boolean validatePassportExpiryDate(String passportExpiryDate) { |
|
|
public boolean validatePassportExpiryDate(String passportExpiryDate) { |
|
|
|
|
|
if (validator.getKycRelatedDataDTO().isUserOfKoreanNative()) |
|
|
|
|
|
return true; |
|
|
|
|
|
|
|
|
if (kycRelatedDataDTO.getPrimaryInformation() == null) |
|
|
if (kycRelatedDataDTO.getPrimaryInformation() == null) |
|
|
kycRelatedDataDTO.setPrimaryInformation(new PrimaryInformationDTO()); |
|
|
kycRelatedDataDTO.setPrimaryInformation(new PrimaryInformationDTO()); |
|
@ -972,7 +982,7 @@ public class KYCV3ViewModel extends BaseViewModel implements KYCV3PresenterInter |
|
|
if (alternateIdNumber == null || alternateIdNumber.length() == 0) { |
|
|
if (alternateIdNumber == null || alternateIdNumber.length() == 0) { |
|
|
view.getCustomerDetailViewContract().enableAlternateIdFocusChangeAndImeOptionListener(false); |
|
|
view.getCustomerDetailViewContract().enableAlternateIdFocusChangeAndImeOptionListener(false); |
|
|
result = false; |
|
|
result = false; |
|
|
} else if (alternateIdNumber.length() > 25) { |
|
|
|
|
|
|
|
|
} else if (alternateIdNumber.length() != ID_CARD_VALID_LENGTH) { |
|
|
view.getCustomerDetailViewContract().enableAlternateIdFocusChangeAndImeOptionListener(false); |
|
|
view.getCustomerDetailViewContract().enableAlternateIdFocusChangeAndImeOptionListener(false); |
|
|
customerDetailErrorLiveDataDTO.setValueToAnotherIdNoError("Invalid Driving License Card"); |
|
|
customerDetailErrorLiveDataDTO.setValueToAnotherIdNoError("Invalid Driving License Card"); |
|
|
result = false; |
|
|
result = false; |
|
@ -1032,7 +1042,7 @@ public class KYCV3ViewModel extends BaseViewModel implements KYCV3PresenterInter |
|
|
|
|
|
|
|
|
kycRelatedDataDTO.getPrimaryInformation().setAnotherIDType(val.getId()); |
|
|
kycRelatedDataDTO.getPrimaryInformation().setAnotherIDType(val.getId()); |
|
|
anotherIdPictureLabeliveData.setValue(getAnotherIdTranslatedLable(val.getText())); |
|
|
anotherIdPictureLabeliveData.setValue(getAnotherIdTranslatedLable(val.getText())); |
|
|
if (ID_TYPE_ALIEN_REGISTRATION_CARD.equalsIgnoreCase(val.getText()) || ID_TYPE_NATIONAL_ID_CARD.equalsIgnoreCase(val.getText())) { |
|
|
|
|
|
|
|
|
if (ID_TYPE_ALIEN_REGISTRATION_CARD.equalsIgnoreCase(val.getText()) || ID_TYPE_NATIONAL_ID_CARD.equalsIgnoreCase(val.getText())||ID_TYPE_DRIVING_LICENSE.equalsIgnoreCase(val.getText())) { |
|
|
view.getCustomerDetailViewContract().updateAnotherIdNumberMask(1); |
|
|
view.getCustomerDetailViewContract().updateAnotherIdNumberMask(1); |
|
|
} else { |
|
|
} else { |
|
|
view.getCustomerDetailViewContract().updateAnotherIdNumberMask(0); |
|
|
view.getCustomerDetailViewContract().updateAnotherIdNumberMask(0); |
|
|