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 Granular Model Validation #1

Merged
merged 7 commits into from
Nov 4, 2023
Merged

Conversation

ThomasLaPiana
Copy link
Owner

@ThomasLaPiana ThomasLaPiana commented Nov 4, 2023

Code Changes

The goal here is to add custom validation logic directly to each struct using a new trait. This gives the ability to surface much more helpful error messages!

The new implementation will see .validate() added as a method to existing models, which returns either () or the new ValidationError result

  • add a new Trait or validation
  • add test scaffolding + tests for the new validation logic
  • implement the trait and add validation logic to the following models:
    • Task
    • VersionRequirements
    • Templates

@ThomasLaPiana ThomasLaPiana self-assigned this Nov 4, 2023
@ThomasLaPiana ThomasLaPiana marked this pull request as ready for review November 4, 2023 15:24
@ThomasLaPiana ThomasLaPiana merged commit 96bd057 into main Nov 4, 2023
1 check passed
@ThomasLaPiana ThomasLaPiana deleted the add-granular-validation branch November 4, 2023 16:14
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

Successfully merging this pull request may close these issues.

1 participant