Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix nonzero validator to not validate nil array or slices. #148

Merged
merged 5 commits into from
Feb 5, 2020

Conversation

blakerouse
Copy link
Contributor

@blakerouse blakerouse commented Feb 3, 2020

Fixes issue where the nonzero validator would fail when the array or slice was nil value.

This also includes fixes for map types where nonzero or required would not validate them correctly.

Closes #147

@blakerouse
Copy link
Contributor Author

@urso This is ready for another review.

@robgil
Copy link

robgil commented Feb 5, 2020

Codecov Report

Merging #148 into master will decrease coverage by 0.34%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #148      +/-   ##
==========================================
- Coverage   78.37%   78.02%   -0.35%     
==========================================
  Files          24       24              
  Lines        2714     2730      +16     
==========================================
+ Hits         2127     2130       +3     
- Misses        431      444      +13     
  Partials      156      156              
Impacted Files Coverage Δ
merge.go 80.00% <0.00%> (-2.15%) ⬇️
types.go 73.31% <0.00%> (-0.93%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 093a689...5cd3649. Read the comment docs.

@blakerouse blakerouse merged commit 1afd60f into elastic:master Feb 5, 2020
@blakerouse blakerouse deleted the fix-nonzero-array-map branch February 5, 2020 21:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Prevent validation on custom structs for nil values
4 participants