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
feat: Add support for omitting empty and zero values in validation (including nil pointer and empty content of pointer) (#1289)
## Fixes Or Enhances
**Add the `omitzero` Tag:**
- It allows you to ignore the subsequent validations if the value of a
field is empty
- If the field is a pointer and the pointer is nil, ignore the
subsequent validations
- If the field is a pointer and the pointer is not nil, but the content
value of the pointer is zero, the subsequent validations will be ignored
**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
0 commit comments