Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
As per some pr's that have been sitting around for a while (e.g. #93) and uncertainty as to how this framework is used in the larger ozzo project I wanted to make sure that this repo was still open before I spend too much time on this.
I've taken the
int_rule
functionality (and corresponding test case) I added in ozzo-validators and added it here. This allows you to validate structs on non-string fields.For instance, IsValidPort and IsAvailablePort here validates on an int rather than a string.
Here's what that looks like in the context of a struct validation: