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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]