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

Implement Configurable File Validation #212

Open
atonks2 opened this issue Dec 9, 2021 · 3 comments
Open

Implement Configurable File Validation #212

atonks2 opened this issue Dec 9, 2021 · 3 comments

Comments

@atonks2
Copy link
Collaborator

atonks2 commented Dec 9, 2021

Because there are so many ICL specifications, not to mention vendors who deviate from those specs, this project needs to be more flexible in the way it validates files. One potential approach would be to implement a ValidateOpts struct containing flags to tailor the validation behavior.

For examples of how this pattern has been implemented in our other OSS repos, see:

@atonks2
Copy link
Collaborator Author

atonks2 commented May 15, 2023

This issue came up in the community Slack group, specifically regarding the ArchiveTypeIndicator field.

Is there a way to solve this or ignore the error and continue parsing? I know 1 is invalid as a ArchiveTypeIndicator, but I am still trying to read the rest of the file.

@atonks2
Copy link
Collaborator Author

atonks2 commented May 15, 2023

Proposed implementation:

  • Use the ACH implementation as a template for these changes
  • Avoid breaking changes
  • Define a ValidateOpts struct to include flags for customizing validation behaviors
    • SkipAll for skipping all validation checks (see ACH for example)
    • SkipArchiveTypeIndicator to skip validation of ArchiveTypeIndicator
  • Add a validateOpts field to the ICL File (here)
    • Example from ACH here

@mfdeveloper508
Copy link
Contributor

#295

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants