Browse Source

Validation fixes

master
Preyea Regmi 5 years ago
parent
commit
c14b2c6bbd
  1. BIN
      .idea/caches/gradle_models.ser
  2. 2
      .idea/misc.xml
  3. 1
      SpinnerDatePickerLib-release/build/.transforms/0675da260f6314d61ba556457cb5e280.bin
  4. 1
      SpinnerDatePickerLib-release/build/.transforms/0a24cede015b207096c9903c9ba470ca.bin
  5. 14
      SpinnerDatePickerLib-release/build/.transforms/0a24cede015b207096c9903c9ba470ca/SpinnerDatePickerLib-release/AndroidManifest.xml
  6. 17
      SpinnerDatePickerLib-release/build/.transforms/0a24cede015b207096c9903c9ba470ca/SpinnerDatePickerLib-release/R.txt
  7. BIN
      SpinnerDatePickerLib-release/build/.transforms/0a24cede015b207096c9903c9ba470ca/SpinnerDatePickerLib-release/jars/classes.jar
  8. 71
      SpinnerDatePickerLib-release/build/.transforms/0a24cede015b207096c9903c9ba470ca/SpinnerDatePickerLib-release/res/layout/date_picker.xml
  9. 41
      SpinnerDatePickerLib-release/build/.transforms/0a24cede015b207096c9903c9ba470ca/SpinnerDatePickerLib-release/res/layout/date_picker_container.xml
  10. 26
      SpinnerDatePickerLib-release/build/.transforms/0a24cede015b207096c9903c9ba470ca/SpinnerDatePickerLib-release/res/layout/date_picker_dialog.xml
  11. 8
      SpinnerDatePickerLib-release/build/.transforms/0a24cede015b207096c9903c9ba470ca/SpinnerDatePickerLib-release/res/layout/date_picker_dialog_container.xml
  12. 33
      SpinnerDatePickerLib-release/build/.transforms/0a24cede015b207096c9903c9ba470ca/SpinnerDatePickerLib-release/res/layout/date_range_picker_dialog_container.xml
  13. 12
      SpinnerDatePickerLib-release/build/.transforms/0a24cede015b207096c9903c9ba470ca/SpinnerDatePickerLib-release/res/layout/number_picker_day_month.xml
  14. 12
      SpinnerDatePickerLib-release/build/.transforms/0a24cede015b207096c9903c9ba470ca/SpinnerDatePickerLib-release/res/layout/number_picker_year.xml
  15. 4
      SpinnerDatePickerLib-release/build/.transforms/0a24cede015b207096c9903c9ba470ca/SpinnerDatePickerLib-release/res/values/values.xml
  16. 0
      SpinnerDatePickerLib-release/build/.transforms/3846844ac364f46cacfdb436bd6b853a.bin
  17. 1
      SpinnerDatePickerLib-release/build/.transforms/5617c67d0a2c1ecb52c1f1dd4f16634c.bin
  18. 0
      SpinnerDatePickerLib-release/build/.transforms/672b72e7485d852c74186cf9d8c53eb1.bin
  19. 1
      SpinnerDatePickerLib-release/build/.transforms/8aad4ca9524e00abd766626a2db2a222.bin
  20. 0
      SpinnerDatePickerLib-release/build/.transforms/d3ea192435239918b75b4914d2a7a177.bin
  21. 1
      SpinnerDatePickerLib-release/build/.transforms/d61fa04a8a4526ed7aef02ec56197c7a.bin
  22. 0
      SpinnerDatePickerLib-release/build/.transforms/ddc2fe41fbed1f9fa4292e7e21158e49.bin
  23. 142
      app/src/main/java/com/gmeremit/online/gmeremittance_native/kycV3/presenter/KYCV3ViewModel.java

BIN
.idea/caches/gradle_models.ser

2
.idea/misc.xml

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="1.8" project-jdk-type="JavaSDK" />
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="JDK" project-jdk-type="JavaSDK" />
</project>

1
SpinnerDatePickerLib-release/build/.transforms/0675da260f6314d61ba556457cb5e280.bin

@ -0,0 +1 @@
i/

1
SpinnerDatePickerLib-release/build/.transforms/0a24cede015b207096c9903c9ba470ca.bin

@ -0,0 +1 @@
o/SpinnerDatePickerLib-release

14
SpinnerDatePickerLib-release/build/.transforms/0a24cede015b207096c9903c9ba470ca/SpinnerDatePickerLib-release/AndroidManifest.xml

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.tsongkha.spinnerdatepicker"
android:versionCode="106"
android:versionName="1.0.6" >
<uses-sdk
android:minSdkVersion="16"
android:targetSdkVersion="27" />
<application android:supportsRtl="true" >
</application>
</manifest>

17
SpinnerDatePickerLib-release/build/.transforms/0a24cede015b207096c9903c9ba470ca/SpinnerDatePickerLib-release/R.txt

@ -0,0 +1,17 @@
int id datePickerContainer 0x7f0b0001
int id dateRangePickerContainer 0x7f0b0002
int id day 0x7f0b0003
int id fromDateText 0x7f0b0004
int id month 0x7f0b0005
int id number_picker 0x7f0b0006
int id parent 0x7f0b0007
int id toDateText 0x7f0b0008
int id year 0x7f0b0009
int layout date_picker 0x7f0e0001
int layout date_picker_container 0x7f0e0002
int layout date_picker_dialog 0x7f0e0003
int layout date_picker_dialog_container 0x7f0e0004
int layout date_range_picker_dialog_container 0x7f0e0005
int layout number_picker_day_month 0x7f0e0006
int layout number_picker_year 0x7f0e0007
int string app_name 0x7f140001

BIN
SpinnerDatePickerLib-release/build/.transforms/0a24cede015b207096c9903c9ba470ca/SpinnerDatePickerLib-release/jars/classes.jar

71
SpinnerDatePickerLib-release/build/.transforms/0a24cede015b207096c9903c9ba470ca/SpinnerDatePickerLib-release/res/layout/date_picker.xml

@ -0,0 +1,71 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
**
** Copyright 2007, The Android Open Source Project
**
** Licensed under the Apache License, Version 2.0 (the "License");
** you may not use this file except in compliance with the License.
** You may obtain a copy of the License at
**
** http://www.apache.org/licenses/LICENSE-2.0
**
** Unless required by applicable law or agreed to in writing, software
** distributed under the License is distributed on an "AS IS" BASIS,
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
** See the License for the specific language governing permissions and
** limitations under the License.
*/
-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="270dip"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:orientation="vertical">
<LinearLayout
android:id="@+id/parent"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:orientation="horizontal">
<!-- Month -->
<NumberPicker
android:id="@+id/month"
android:layout_width="80dip"
android:layout_height="wrap_content"
android:layout_marginEnd="1dip"
android:layout_marginLeft="1dip"
android:layout_marginRight="1dip"
android:layout_marginStart="1dip"
android:focusable="true"
android:focusableInTouchMode="true"
/>
<!-- Day -->
<NumberPicker
android:id="@+id/day"
android:layout_width="80dip"
android:layout_height="wrap_content"
android:layout_marginEnd="1dip"
android:layout_marginLeft="1dip"
android:layout_marginRight="1dip"
android:layout_marginStart="1dip"
android:focusable="true"
android:focusableInTouchMode="true"
/>
<!-- Year -->
<NumberPicker
android:id="@+id/year"
android:layout_width="95dip"
android:layout_height="wrap_content"
android:layout_marginEnd="1dip"
android:layout_marginLeft="1dip"
android:layout_marginRight="1dip"
android:layout_marginStart="1dip"
android:focusable="true"
android:focusableInTouchMode="true"
/>
</LinearLayout>
</LinearLayout>

41
SpinnerDatePickerLib-release/build/.transforms/0a24cede015b207096c9903c9ba470ca/SpinnerDatePickerLib-release/res/layout/date_picker_container.xml

@ -0,0 +1,41 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
**
** Copyright 2007, The Android Open Source Project
**
** Licensed under the Apache License, Version 2.0 (the "License");
** you may not use this file except in compliance with the License.
** You may obtain a copy of the License at
**
** http://www.apache.org/licenses/LICENSE-2.0
**
** Unless required by applicable law or agreed to in writing, software
** distributed under the License is distributed on an "AS IS" BASIS,
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
** See the License for the specific language governing permissions and
** limitations under the License.
*/
-->
<!-- Layout of date picker-->
<!-- The width of this container is manually set a little bigger than the one of the children
contained in it. This helps to prevent rounding errors when toggling the "Show year" option -->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_gravity="center_horizontal"
android:layout_width="270dip"
android:layout_height="wrap_content">
<!-- Warning: everything within the parent is removed and re-ordered depending
on the date format selected by the user. -->
<LinearLayout
android:id="@+id/parent"
android:orientation="horizontal"
android:layout_gravity="center_horizontal"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
</LinearLayout>
</LinearLayout>

26
SpinnerDatePickerLib-release/build/.transforms/0a24cede015b207096c9903c9ba470ca/SpinnerDatePickerLib-release/res/layout/date_picker_dialog.xml

@ -0,0 +1,26 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2007 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<com.tsongkha.spinnerdatepicker.DatePicker xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/datePickerContainer"
android:layout_gravity="center_horizontal"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:spinnersShown="true"
android:calendarViewShown="false"
/>
<!--android:dialogMode="true" -->

8
SpinnerDatePickerLib-release/build/.transforms/0a24cede015b207096c9903c9ba470ca/SpinnerDatePickerLib-release/res/layout/date_picker_dialog_container.xml

@ -0,0 +1,8 @@
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/datePickerContainer"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal">
</FrameLayout>

33
SpinnerDatePickerLib-release/build/.transforms/0a24cede015b207096c9903c9ba470ca/SpinnerDatePickerLib-release/res/layout/date_range_picker_dialog_container.xml

@ -0,0 +1,33 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_width="wrap_content"
android:id="@+id/dateRangePickerContainer"
android:layout_height="wrap_content">
<TextView
android:layout_marginStart="25dp"
android:layout_marginLeft="12dp"
android:layout_marginTop="10dp"
android:paddingTop="3dp"
android:paddingBottom="3dp"
android:text="From Date: "
android:id="@+id/fromDateText"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="16sp"
/>
<TextView
android:layout_marginTop="5dp"
android:layout_marginStart="25dp"
android:layout_marginLeft="25dp"
android:paddingTop="3dp"
android:paddingBottom="3dp"
android:text="To Date: "
android:id="@+id/toDateText"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="16sp"/>
</LinearLayout>

12
SpinnerDatePickerLib-release/build/.transforms/0a24cede015b207096c9903c9ba470ca/SpinnerDatePickerLib-release/res/layout/number_picker_day_month.xml

@ -0,0 +1,12 @@
<NumberPicker
android:id="@+id/number_picker"
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="80dip"
android:layout_height="wrap_content"
android:layout_marginLeft="1dip"
android:layout_marginRight="1dip"
android:layout_marginStart="1dip"
android:layout_marginEnd="1dip"
android:focusable="true"
android:focusableInTouchMode="true"
/>

12
SpinnerDatePickerLib-release/build/.transforms/0a24cede015b207096c9903c9ba470ca/SpinnerDatePickerLib-release/res/layout/number_picker_year.xml

@ -0,0 +1,12 @@
<NumberPicker
android:id="@+id/number_picker"
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="95dip"
android:layout_height="wrap_content"
android:layout_marginLeft="1dip"
android:layout_marginRight="1dip"
android:layout_marginStart="1dip"
android:layout_marginEnd="1dip"
android:focusable="true"
android:focusableInTouchMode="true"
/>

4
SpinnerDatePickerLib-release/build/.transforms/0a24cede015b207096c9903c9ba470ca/SpinnerDatePickerLib-release/res/values/values.xml

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">SpinnerDatePicker</string>
</resources>

0
SpinnerDatePickerLib-release/build/.transforms/3846844ac364f46cacfdb436bd6b853a.bin

1
SpinnerDatePickerLib-release/build/.transforms/5617c67d0a2c1ecb52c1f1dd4f16634c.bin

@ -0,0 +1 @@
i/res

0
SpinnerDatePickerLib-release/build/.transforms/672b72e7485d852c74186cf9d8c53eb1.bin

1
SpinnerDatePickerLib-release/build/.transforms/8aad4ca9524e00abd766626a2db2a222.bin

@ -0,0 +1 @@
i/jars/classes.jar

0
SpinnerDatePickerLib-release/build/.transforms/d3ea192435239918b75b4914d2a7a177.bin

1
SpinnerDatePickerLib-release/build/.transforms/d61fa04a8a4526ed7aef02ec56197c7a.bin

@ -0,0 +1 @@
i/AndroidManifest.xml

0
SpinnerDatePickerLib-release/build/.transforms/ddc2fe41fbed1f9fa4292e7e21158e49.bin

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

@ -45,6 +45,7 @@ import static android.app.Activity.RESULT_OK;
public class KYCV3ViewModel extends BaseViewModel implements KYCV3PresenterInterface {
private static final int ID_CARD_VALID_LENGTH = 13;
private final KYCV3PresenterInterface.KYCV3ViewContractInterface view;
private final KYCV3GatewayInterface gateway;
private final CompositeDisposable customerDetailViewSubscriptions;
@ -282,35 +283,11 @@ public class KYCV3ViewModel extends BaseViewModel implements KYCV3PresenterInter
log("Alternated Id Expiry Date started emission" + val);
return validator.validateAlternateIDExpiryDate2(val.toString());
}),
(isAlternateIdNoValid, isAlternateIdIssuedDateValid, isAlternatedIDExpiryDateValid) -> isAlternateIdNoValid && isAlternateIdIssuedDateValid && isAlternatedIDExpiryDateValid
).withLatestFrom(this.view.getCustomerDetailViewContract().getForm2ViewBindings().getAlternateIdTypeChangeEvent().map(val -> {
this.view.getCustomerDetailViewContract().getForm2ViewBindings().getAlternateIdTypeChangeEvent().map(val -> {
log("Alternated Id Type started emission" + val.getText());
alternateIdRelatedViewResetLiveData.setValue(true);
customerDetailErrorLiveDataDTO.setValueToAnotherIdNoError(null);
customerDetailErrorLiveDataDTO.setValueToAnotherIDIssuedDateError(null);
customerDetailErrorLiveDataDTO.setValueToAnotherIDExpiryDateError(null);
//Update Data
if (validator.getKycRelatedDataDTO().getPrimaryInformation() != null) {
validator.getKycRelatedDataDTO().getPrimaryInformation().setAnotherIDNumber("");
validator.getKycRelatedDataDTO().getPrimaryInformation().setAnotherIDIssueDate("");
validator.getKycRelatedDataDTO().getPrimaryInformation().setAnotherIDExpiryDate("");
}
alternateIdRelatedValidationSubject.onNext(false);
return validator.validateAlternateIdType(val);
return validator.validateAlternateIdType2(val);
}),
(isAlternatedTypeDependenciesValid, isAlternateIdTypeValid) -> {
log("AlternatedIDDependencies isValid : " + isAlternatedTypeDependenciesValid);
log("AlternateIDType isValid : " + isAlternateIdTypeValid);
return isAlternatedTypeDependenciesValid && isAlternateIdTypeValid;
}
);
(isAlternateIdNoValid, isAlternateIdIssuedDateValid, isAlternatedIDExpiryDateValid,isAlternateIdTypeValid) -> isAlternateIdNoValid && isAlternateIdIssuedDateValid && isAlternatedIDExpiryDateValid&&isAlternateIdTypeValid);
}
private Observable<Boolean> setupAlternateIDDependenciesValidation2() {
@ -850,7 +827,6 @@ public class KYCV3ViewModel extends BaseViewModel implements KYCV3PresenterInter
public boolean validateAlternateIdType2(IDTypeDTO val) {
boolean result = false;
if (kycRelatedDataDTO.getPrimaryInformation() == null)
kycRelatedDataDTO.setPrimaryInformation(new PrimaryInformationDTO());
@ -858,9 +834,6 @@ public class KYCV3ViewModel extends BaseViewModel implements KYCV3PresenterInter
if (val == null) {
customerDetailErrorLiveDataDTO.setValueToAnotherIdTypeError("Select different ID Type");
kycRelatedDataDTO.getPrimaryInformation().setAnotherIDType("");
kycRelatedDataDTO.logFormSubmissionData();
} else if (val.getId() == null || val.getId().length() == 0) {
return true;
} else {
kycRelatedDataDTO.getPrimaryInformation().setAnotherIDType(val.getId());
anotherIdPictureLabeliveData.setValue(getAnotherIdTranslatedLable(val.getText()));
@ -870,39 +843,95 @@ public class KYCV3ViewModel extends BaseViewModel implements KYCV3PresenterInter
view.getCustomerDetailViewContract().updateAnotherIdNumberMask(0);
}
if (kycRelatedDataDTO.getPrimaryInformation().isAnotherIDTypeValid()) {
alternateIDIssueVisibilityDateRequireLiveData.setValue(false);
alternateIDExpiryDateVisibilityLiveData.setValue(false);
boolean hasIssuedDateRequiredField = false;
boolean hasExpiryDateRequiredField = false;
for (String dependent : val.getDependent()) {
if ("docIssueDate".equalsIgnoreCase(dependent)) {
alternateIDIssueVisibilityDateRequireLiveData.setValue(true);
hasIssuedDateRequiredField = true;
} else if ("docExpiryDate".equalsIgnoreCase(dependent)) {
alternateIDExpiryDateVisibilityLiveData.setValue(true);
hasExpiryDateRequiredField = true;
}
}
if (!hasExpiryDateRequiredField)
anotherIdExpDateLiveData.setValue("Asf");
else
anotherIdExpDateLiveData.setValue("");
if (!hasIssuedDateRequiredField)
anotherIdIssuedDateLiveData.setValue("asf");
else
anotherIdIssuedDateLiveData.setValue("");
result = true;
result = validateAlternateIDRelatedFieldData();
} else {
customerDetailErrorLiveDataDTO.setValueToAnotherIdTypeError("Select different ID Type");
}
}
customerDetailAlternateIDFieldEnableLiveData.setValue(result);
log("Alternate Id Type validation result: " + result);
return result;
}
private boolean validateAlternateIDRelatedFieldData() {
if (kycRelatedDataDTO.getPrimaryInformation() != null) {
String selectedIdType = kycRelatedDataDTO.getPrimaryInformation().getAnotherIDType();
String alternateIdExpiryDate = kycRelatedDataDTO.getPrimaryInformation().getAnotherIDExpiryDate();
String alternateIdIssuedDate = kycRelatedDataDTO.getPrimaryInformation().getAnotherIDIssueDate();
String alternateIdNumber = kycRelatedDataDTO.getPrimaryInformation().getAnotherIDNumber();
if (selectedIdType == null || selectedIdType.length() == 0)
return true;
if (ID_TYPE_NATIONAL_ID_CARD.equalsIgnoreCase(selectedIdType)) {
boolean nationalIDCardValidationResult = true;
if (alternateIdIssuedDate == null || alternateIdIssuedDate.length() == 0)
nationalIDCardValidationResult = false;
else {
if (alternateIdNumber == null || alternateIdNumber.length() != ID_CARD_VALID_LENGTH) {
customerDetailErrorLiveDataDTO.setValueToAnotherIdNoError("Invalid National Id Card");
nationalIDCardValidationResult = false;
}
}
return nationalIDCardValidationResult;
} else if (ID_TYPE_ALIEN_REGISTRATION_CARD.equalsIgnoreCase(selectedIdType)) {
boolean alienCardValidationResult = true;
if (alternateIdExpiryDate == null || alternateIdExpiryDate.length() == 0)
alienCardValidationResult = false;
else if (alternateIdIssuedDate == null || alternateIdIssuedDate.length() == 0)
alienCardValidationResult = false;
else {
if (alternateIdNumber == null || alternateIdNumber.length() != ID_CARD_VALID_LENGTH) {
customerDetailErrorLiveDataDTO.setValueToAnotherIdNoError("Invalid Alien Id Card");
alienCardValidationResult = false;
}
}
return alienCardValidationResult;
} else if (ID_TYPE_DRIVING_LICENSE.equalsIgnoreCase(selectedIdType)) {
boolean drivingValidationResult = true;
if (alternateIdExpiryDate == null || alternateIdExpiryDate.length() == 0)
drivingValidationResult = false;
else if (alternateIdIssuedDate == null || alternateIdIssuedDate.length() == 0)
drivingValidationResult = false;
else {
if (alternateIdNumber == null || alternateIdNumber.length() != ID_CARD_VALID_LENGTH) {
customerDetailErrorLiveDataDTO.setValueToAnotherIdNoError("Invalid Driving License Card");
drivingValidationResult = false;
}
}
return drivingValidationResult;
} else if (ID_TYPE_PASSPORT.equalsIgnoreCase(selectedIdType)) {
boolean passportValidationResult = true;
if (alternateIdExpiryDate == null || alternateIdExpiryDate.length() == 0)
passportValidationResult = false;
else if (alternateIdIssuedDate == null || alternateIdIssuedDate.length() == 0)
passportValidationResult = false;
else {
if (alternateIdNumber == null || alternateIdNumber.length() < 1) {
customerDetailErrorLiveDataDTO.setValueToAnotherIdNoError("Invalid Passport");
passportValidationResult = false;
}
}
return passportValidationResult;
}
}
return true;
}
public boolean validateAlternateIdType(IDTypeDTO val) {
boolean result = false;
@ -921,6 +950,7 @@ public class KYCV3ViewModel extends BaseViewModel implements KYCV3PresenterInter
view.getCustomerDetailViewContract().updateAnotherIdNumberMask(0);
}
if (kycRelatedDataDTO.getPrimaryInformation().isAnotherIDTypeValid()) {
alternateIDIssueVisibilityDateRequireLiveData.setValue(false);
alternateIDExpiryDateVisibilityLiveData.setValue(false);
@ -1004,7 +1034,7 @@ public class KYCV3ViewModel extends BaseViewModel implements KYCV3PresenterInter
if (kycRelatedDataDTO.getPrimaryInformation().isAnotherIDNoValid()) {
customerDetailErrorLiveDataDTO.setValueToAnotherIdNoError(null);
view.getCustomerDetailViewContract().enableAlternateIdFocusChangeAndImeOptionListener(true);
return true;
return validateAlternateIDRelatedFieldData();
} else {
customerDetailErrorLiveDataDTO.setValueToAnotherIdNoError(getStringfromStringId(R.string.empty_field_error_text));
view.getCustomerDetailViewContract().enableAlternateIdFocusChangeAndImeOptionListener(false);
@ -1020,15 +1050,7 @@ public class KYCV3ViewModel extends BaseViewModel implements KYCV3PresenterInter
kycRelatedDataDTO.setPrimaryInformation(new PrimaryInformationDTO());
kycRelatedDataDTO.getPrimaryInformation().setAnotherIDIssueDate(alternateIDIssuedDate);
if (kycRelatedDataDTO.getPrimaryInformation().isAnotherIDIssuedDateValid()) {
customerDetailErrorLiveDataDTO.setValueToAnotherIDIssuedDateError(null);
Log.d("AlternateIdValidation", "Issued Date : " + "Valid");
return true;
} else {
customerDetailErrorLiveDataDTO.setValueToAnotherIDIssuedDateError(getStringfromStringId(R.string.empty_field_error_text));
Log.d("AlternateIdValidation", "Issued Date : " + "InValid");
return false;
}
return validateAlternateIDRelatedFieldData();
}
@ -1042,13 +1064,7 @@ public class KYCV3ViewModel extends BaseViewModel implements KYCV3PresenterInter
kycRelatedDataDTO.getPrimaryInformation().setAnotherIDExpiryDate(alternateIDIExpiryDate);
if (kycRelatedDataDTO.getPrimaryInformation().isAnotherIDExpiryDateValid()) {
customerDetailErrorLiveDataDTO.setValueToAnotherIDExpiryDateError(null);
return true;
} else {
customerDetailErrorLiveDataDTO.setValueToAnotherIDExpiryDateError(getStringfromStringId(R.string.empty_field_error_text));
return false;
}
return validateAlternateIDRelatedFieldData();
}
public boolean validatePassportImage(File data) {

Loading…
Cancel
Save