etreschenkov 2026-05-26 17:02:02 +03:00
parent acedbcda92
commit 0a4d7996e3

View file

@ -34,9 +34,6 @@ public enum GatewayEksClientCodeValidationRule implements IValidationRule<ImdgVa
public Optional<EnumMessage> validate(ImdgValidationContext<TkrAccount> context) {
TkrAccount validatedObject = context.getValidatedObject();
Collection<MoneyAccountMsgRequest> msgs = validatedObject.getMoneyAccounts().stream()
.filter(acc -> !StringUtils.hasText(acc.getAccount()) && StringUtils.hasText(acc.getEks_account()))
.toList();
for (MoneyAccountMsgRequest msg : validatedObject.getMoneyAccounts()) {
if (!StringUtils.hasText(msg.getAccount()) && !StringUtils.hasText(msg.getEks_account())) {
return of(AccountError.RequiredFieldEmpty, "account+eks_account");
@ -45,9 +42,6 @@ public enum GatewayEksClientCodeValidationRule implements IValidationRule<ImdgVa
return of(AccountError.WrongFieldValue, "status");
}
}
if (!msgs.isEmpty()) {
return of(AccountError.RequiredFieldEmpty, "account+eks_account");
}
return empty();
}
},