8000 Improve validation of pointer fields by kaptinlin · Pull Request #237 · gookit/validate · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Improve validation of pointer fields #237

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

Merged
merged 1 commit into from
Sep 19, 2023
Merged

Improve validation of pointer fields #237

merged 1 commit into from
Sep 19, 2023

Conversation

kaptinlin
Copy link
Contributor

Enhanced the validation logic to handle pointer fields more robustly. Previously, the validation would fail when a field was a pointer type but the validation function expected a non-pointer type. The changes include dereferencing the pointer before validation if the validation function does not expect a pointer, and adding a nil check before dereferencing. This makes the validation logic more robust and flexible, allowing for better handling of pointer and non-pointer fields.

Fix #236

@coveralls
Copy link

Pull Request Test Coverage Report for Build 6233853822

  • 3 of 8 (37.5%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.2%) to 96.074%

Changes Missing Coverage Covered Lines Changed/Added Lines %
validating.go 3 8 37.5%
Totals Coverage Status
Change from base Build 6194998097: -0.2%
Covered Lines: 2839
Relevant Lines: 2955

💛 - Coveralls

@inhere inhere added the enhancement New feature or request label Sep 19, 2023
@inhere inhere merged commit b4d96df into gookit:master Sep 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

email don't support ptr
3 participants
0