asaskevich / govalidator

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

feat: add IsPositive tag validator #453

Open Jesse0Michael opened 2 years ago

Jesse0Michael commented 2 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 2 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.