You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What were you trying to do?
Looking through base segment code in pkg/lib/base_segment.go.
What did you expect to see?
Expected to see Validate* functions that check provided values against a list of constants for all applicable base segment fields, similar to the existing ValidatePortfolioType().
What did you see?
Noticed absence of Validate* functions for quite a few applicable base segment fields in pkg/lib/base_segment.go. Examples I would have expected to see are ValidateAccountStatus(), ValidateAccountType(), ValidateSpecialComment(), and possibly more.
How can we reproduce the problem?
Constructing a base segment with, for example, AccountType of FF (an invalid CRRG value) and adding the segment via AddDataRecord allows the segment to be added, when I would expect a NewErrInvalidValueOfField error.
Mentioned this in the slack channel, happy to help with PR(s) to get some of these added if we decide it's appropriate!
The text was updated successfully, but these errors were encountered:
Metro2 Version:
0.8.2
What were you trying to do?
Looking through base segment code in
pkg/lib/base_segment.go
.What did you expect to see?
Expected to see
Validate*
functions that check provided values against a list of constants for all applicable base segment fields, similar to the existingValidatePortfolioType()
.What did you see?
Noticed absence of
Validate*
functions for quite a few applicable base segment fields inpkg/lib/base_segment.go
. Examples I would have expected to see areValidateAccountStatus()
,ValidateAccountType()
,ValidateSpecialComment()
, and possibly more.How can we reproduce the problem?
Constructing a base segment with, for example,
AccountType
ofFF
(an invalid CRRG value) and adding the segment viaAddDataRecord
allows the segment to be added, when I would expect aNewErrInvalidValueOfField
error.Mentioned this in the slack channel, happy to help with PR(s) to get some of these added if we decide it's appropriate!
The text was updated successfully, but these errors were encountered: