Browse Source

add upload validation

PankajBranch
Manoj 2 years ago
parent
commit
13cca65437
1 changed files with 11 additions and 6 deletions
  1. +11
    -6
      app/src/main/java/com/nivesh/production/bajajfd/ui/fragment/StepThreeBajajFDFragment.kt

+ 11
- 6
app/src/main/java/com/nivesh/production/bajajfd/ui/fragment/StepThreeBajajFDFragment.kt View File

@ -410,17 +410,22 @@ class StepThreeBajajFDFragment : BaseFragment() {
private fun validate(): Boolean { private fun validate(): Boolean {
if (binding.spDocType.text.equals(R.string.aadhar) && mapImage.size == 4) {
return true
} else if (mapImage.size == 3) {
return true
} else if (mapImage.size < 3) {
if (mapImage.size == 3 && binding.spDocType.text.equals(R.string.aadhar)) {
Common.showDialogValidation(
activity as BajajFdMainActivity,
"Upload Aadhar Images"
)
return false
}
else if (mapImage.size < 3) {
Common.showDialogValidation( Common.showDialogValidation(
activity as BajajFdMainActivity, activity as BajajFdMainActivity,
"Upload Image Not Done"
"Upload All Images"
) )
return false return false
} }
else return true
return false return false
} }


Loading…
Cancel
Save

Powered by TurnKey Linux.