ozzo-validation
ozzo-validation copied to clipboard
add int rule
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: