account-service securities-service Валидаторы...
This commit is contained in:
parent
616df8d5e5
commit
4b25a6d1e9
2 changed files with 2 additions and 4 deletions
|
|
@ -53,6 +53,7 @@ public class BankAccountValidationConfig {
|
|||
Company.class,
|
||||
AccountError.RequiredFieldEmpty,
|
||||
AccountError.CompanyNotFound,
|
||||
false,
|
||||
company -> WorkflowStatus.Active.equalsByKey(company.getWorkflowStatus()) ? null : AccountError.CompanyNotActive),
|
||||
FieldRequiredRule.instance("account",
|
||||
BankAccountNewRequest::getAccount,
|
||||
|
|
@ -83,9 +84,6 @@ public class BankAccountValidationConfig {
|
|||
AccountError.RequiredFieldEmpty),
|
||||
FieldRequiredRule.instance("bankName",
|
||||
BankAccountNewRequest::getBankName,
|
||||
AccountError.RequiredFieldEmpty),
|
||||
FieldRequiredRule.instance("destination",
|
||||
BankAccountNewRequest::getDestination,
|
||||
AccountError.RequiredFieldEmpty)
|
||||
);
|
||||
};
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ public class HaveValidCodeByDictionary<R> implements IValidationRule<ImdgValidat
|
|||
if (required)
|
||||
return of(SecuritiesError.RequiredFieldIsEmpty, errArg);
|
||||
else
|
||||
return null;
|
||||
return empty();
|
||||
}
|
||||
Imdg<SpcexObjectBase> imdgDictionary = context.obtainMap(mapName, SpcexObjectBase.class);
|
||||
SpcexObjectBase dictionary = imdgDictionary.getSingleObjectByFieldValues(Map.of(
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue