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 row level validation #82

Merged
merged 2 commits into from
May 5, 2023
Merged

Add row level validation #82

merged 2 commits into from
May 5, 2023

Conversation

jonafato
Copy link
Collaborator

@jonafato jonafato commented May 2, 2023

Add the concept of row-level validation and a basic RowLengthValidator as a proof of concept / first use. This change allows for validators that make use of the row as a whole rather than individual fields. The RowLengthValidator demonstrates this by simply checking the length of the row (a dict returned by csv.DictReader); other uses may include interdependent fields (e.g. A and B are both present or both absent).

Resolves #81.

Add the concept of row-level validation and a basic RowLengthValidator
as a proof of concept / first use. This change allows for validators
that make use of the row as a whole rather than individual fields. The
RowLengthValidator demonstrates this by simply checking the length of
the row (a dict returned by csv.DictReader); other uses may include
interdependent fields (e.g. A and B are both present or both absent).
@jonafato jonafato mentioned this pull request May 2, 2023
Copy link
Owner

@di di left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No notes! If you think this is ready I'm happy to merge.

@jonafato jonafato marked this pull request as ready for review May 5, 2023 16:21
@jonafato
Copy link
Collaborator Author

jonafato commented May 5, 2023

I've just added the missing logging, I think this should be good to go.

@di di merged commit 9d7c5dd into di:master May 5, 2023
@di
Copy link
Owner

di commented May 5, 2023

FYI, this won't be released until I can resolve #80, if you'd like to work on that!

@jonafato jonafato deleted the row-level-validators branch May 5, 2023 17:11
jonafato added a commit to jonafato/vladiate that referenced this pull request Mar 15, 2024
This class attribute and init argument were added in di#82, but this
documentation was not included in the initial PR.

Additionally, fixes a readme typo.
di pushed a commit that referenced this pull request Mar 15, 2024
This class attribute and init argument were added in #82, but this
documentation was not included in the initial PR.

Additionally, fixes a readme typo.
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.

Row-level validation
2 participants