You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@fineract.apache.org by GitBox <gi...@apache.org> on 2021/11/29 12:38:04 UTC

[GitHub] [fineract] fynmanoj commented on a change in pull request #1984: FINERACT-1431:PassportDropDown-in-ClientIdentifier

fynmanoj commented on a change in pull request #1984:
URL: https://github.com/apache/fineract/pull/1984#discussion_r758322188



##########
File path: fineract-provider/src/main/java/org/apache/fineract/portfolio/client/domain/ClientIdentifier.java
##########
@@ -58,20 +62,29 @@
     private Integer active;
 
     public static ClientIdentifier fromJson(final Client client, final CodeValue documentType, final JsonCommand command) {
+
         final String documentKey = command.stringValueOfParameterNamed("documentKey");
         final String description = command.stringValueOfParameterNamed("description");
         final String status = command.stringValueOfParameterNamed("status");
-        return new ClientIdentifier(client, documentType, documentKey, status, description);
+        String documentTypeValue = null;
+        if (documentType.label().equals("Passport")) {
+            documentTypeValue = command.stringValueOfParameterNamed("documentTypeValue");
+            if ("".equals(documentTypeValue)) {
+                throw new PlatformDataIntegrityException("Selection of Country is Mandatory", "error.msg.selection.of.country.mandatory");

Review comment:
       Please move this validation to Validator class.  




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@fineract.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org