asaskevich / govalidator

[Go] Package of validators and sanitizers for strings, numerics, slices and structs
MIT License
6.05k stars 555 forks source link

feat: add IsPositive tag validator #453

Open Jesse0Michael opened 3 years ago

Jesse0Michael commented 3 years ago
Q A
Documentation no
Bugfix no
BC Break no
New Feature yes
RFC no
QA yes

Description

add the option to use the tag positive to validate that a struct field is positive. ie: valid:"positive"

resolves: https://github.com/asaskevich/govalidator/issues/388

sergeyglazyrindev commented 3 years ago

Hello guys! I forked this package cause owner disappeared. Hope, he will be back, but it would be easier to merge these changes back if he is back Link to my repo: create issue there and we'll discuss it.