You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
## Fixes Or Enhances
This PR adds a new validation for numeric ports.
Connected to: #1216
```
type Host struct {
Port uint32 `validate:"port"`
}
```
**Make sure that you've checked the boxes below before you submit PR:**
- [x] Tests exist or have been written that cover this particular
change.
@go-playground/validator-maintainers
## Fixes Or Enhances
This PR adds a new validation for numeric ports.
Connected to: go-playground#1216
```
type Host struct {
Port uint32 `validate:"port"`
}
```
**Make sure that you've checked the boxes below before you submit PR:**
- [x] Tests exist or have been written that cover this particular
change.
@go-playground/validator-maintainers
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: