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 int rule #145

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

add int rule #145

wants to merge 1 commit into from

Conversation

jakesylvestre
Copy link

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:

image

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.2%) to 99.225% when pulling 393bfcd on xplorfin:int-rule into 34bd547 on go-ozzo:master.

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.

2 participants