asaskevich / govalidator

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

Added option to allow validation of empty values by custom validators #409

Open mrwcjoughin opened 3 years ago

mrwcjoughin commented 3 years ago

This feature is implemented as a new optional feature - it is not a breaking feature

You set it by calling the below method passing true: govalidator.SetEmptyValueAllowed(true)

Q A
Documentation yes
Bugfix no
BC Break no
New Feature yes
RFC yes
QA yes

Description

This change is necessary because the user of this package should be able to validate empty values.

migueleliasweb commented 3 years ago

This seems like a good non-breaking implementation for the issue lots of people are having. How can we get some reviews here?

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.