We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
v10
Please add support for numeric ports, e.g. a port of type uint. For now we have two options
uint
hostname_port
":8080"
validate:"gte=1,lte=65535"
The solution would be very similiar to this implementation
https://github.com/go-playground/validator/blob/master/baked_in.go#L2675
The keyword could be port, the implementation could be
port
func isPort(fl FieldLevel) bool { val := fl.Field().Uint() return val >= 1 && val <= 65535 }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Package version eg. v9, v10:
v10
Issue, Question or Enhancement:
Please add support for numeric ports, e.g. a port of type
uint
. For now we have two optionshostname_port
and pass in a string, e.g.":8080"
validate:"gte=1,lte=65535"
Code sample, to showcase or reproduce:
The solution would be very similiar to this implementation
https://github.com/go-playground/validator/blob/master/baked_in.go#L2675
The keyword could be
port
, the implementation could beThe text was updated successfully, but these errors were encountered: