Skip to content

add int rule#145

Open
jakesylvestre wants to merge 1 commit intogo-ozzo:masterfrom
xplorfin:int-rule
Open

add int rule#145
jakesylvestre wants to merge 1 commit intogo-ozzo:masterfrom
xplorfin:int-rule

Conversation

@jakesylvestre
Copy link
Copy Markdown

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
Copy Markdown

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