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

Add setters and validators #34

Open
thomasmholder opened this issue Jan 27, 2023 · 0 comments · May be fixed by #41
Open

Add setters and validators #34

thomasmholder opened this issue Jan 27, 2023 · 0 comments · May be fixed by #41
Assignees
Labels
refactor rewriting or reorganizing existing code
Milestone

Comments

@thomasmholder
Copy link
Contributor

Right now, all header fields are validated only at encode time, which is bad because it obfuscates where something actually goes wrong. Validation should be done at construction and when fields are set via setters (which need to be created).

Additionally, the current validation logic uses ranges to verify that properties are legal, where we should probably be checking to see if they're a member of the appropriate enum. That logic can probably be broken out into static validater functions.

@DarylDohner DarylDohner added the refactor rewriting or reorganizing existing code label Jan 31, 2023
@DarylDohner DarylDohner added this to the 2023 Spring milestone Jan 31, 2023
@David-Rey David-Rey self-assigned this Feb 3, 2023
@thomasmholder thomasmholder linked a pull request Feb 8, 2023 that will close this issue
@panyab panyab modified the milestones: 2023 Spring, Backlog Jan 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactor rewriting or reorganizing existing code
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants