Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

field constraints support #58

Open
vtolstov opened this issue May 24, 2021 · 1 comment
Open

field constraints support #58

vtolstov opened this issue May 24, 2021 · 1 comment
Labels
enhancement New feature or request help wanted Extra attention is needed question Further information is requested

Comments

@vtolstov
Copy link

some fields not only must have iso8583 types, but also must conform to some other stuff like len of field, or number of spaces or digits , may be cool to add Validate func(field.Field) error to spec?
So after we fill the fields and Validate func not nil we can call it and get reasonable error if it present?
Also we can create predefined funcs as example for date time fields for example...
i think that this will be cool

@alovak alovak added the enhancement New feature or request label Jun 9, 2021
@adamdecaf adamdecaf added help wanted Extra attention is needed question Further information is requested labels Jul 6, 2021
@alovak
Copy link
Contributor

alovak commented Jul 7, 2021

@vtolstov it you have a chance to make a draft/proposal for this that would be really helpful.

We can add validation to each field (Numeric, String, Datetime, etc.) or we can add Validation to the Spec. Maybe for the spec we can add something like a format that will be passed to the field validator. What are your thoughts?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants