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,
|
Company.class,
|
||||||
AccountError.RequiredFieldEmpty,
|
AccountError.RequiredFieldEmpty,
|
||||||
AccountError.CompanyNotFound,
|
AccountError.CompanyNotFound,
|
||||||
|
false,
|
||||||
company -> WorkflowStatus.Active.equalsByKey(company.getWorkflowStatus()) ? null : AccountError.CompanyNotActive),
|
company -> WorkflowStatus.Active.equalsByKey(company.getWorkflowStatus()) ? null : AccountError.CompanyNotActive),
|
||||||
FieldRequiredRule.instance("account",
|
FieldRequiredRule.instance("account",
|
||||||
BankAccountNewRequest::getAccount,
|
BankAccountNewRequest::getAccount,
|
||||||
|
|
@ -83,9 +84,6 @@ public class BankAccountValidationConfig {
|
||||||
AccountError.RequiredFieldEmpty),
|
AccountError.RequiredFieldEmpty),
|
||||||
FieldRequiredRule.instance("bankName",
|
FieldRequiredRule.instance("bankName",
|
||||||
BankAccountNewRequest::getBankName,
|
BankAccountNewRequest::getBankName,
|
||||||
AccountError.RequiredFieldEmpty),
|
|
||||||
FieldRequiredRule.instance("destination",
|
|
||||||
BankAccountNewRequest::getDestination,
|
|
||||||
AccountError.RequiredFieldEmpty)
|
AccountError.RequiredFieldEmpty)
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,7 @@ public class HaveValidCodeByDictionary<R> implements IValidationRule<ImdgValidat
|
||||||
if (required)
|
if (required)
|
||||||
return of(SecuritiesError.RequiredFieldIsEmpty, errArg);
|
return of(SecuritiesError.RequiredFieldIsEmpty, errArg);
|
||||||
else
|
else
|
||||||
return null;
|
return empty();
|
||||||
}
|
}
|
||||||
Imdg<SpcexObjectBase> imdgDictionary = context.obtainMap(mapName, SpcexObjectBase.class);
|
Imdg<SpcexObjectBase> imdgDictionary = context.obtainMap(mapName, SpcexObjectBase.class);
|
||||||
SpcexObjectBase dictionary = imdgDictionary.getSingleObjectByFieldValues(Map.of(
|
SpcexObjectBase dictionary = imdgDictionary.getSingleObjectByFieldValues(Map.of(
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue