-
Notifications
You must be signed in to change notification settings - Fork 116
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
Pointer of UUID will break the Validate() function #247
Comments
Hi!. I was checking this and yes, this kind of validation does not work. I think this is due the nature of uuid google's package. Could this happend with other types based on Bytes? |
yes. Validation falls to panic in the recursive function. https://go.dev/play/p/sfexq-rEVK9 |
https://go.dev/play/p/fTVTY9roF3s - this test with github.com/gofrs/uuid package but result is the same. Bug is in validation code. https://go.dev/play/p/FhuzBTFpjX_c - pointer to any array (fixed array or byte slice) throws this panic. You can remove size of array to get slice and check. func parseRulesFromTag while running func recursiveFunc |
hi @ip75 @manicar2093 @jeremy-temelpa The problem has been fixed, please wait for the next version to be released. |
Please upgrade to https://github.com/gookit/validate/releases/tag/v1.5.2 |
System (please complete the following information):
macOS
1.20
1.5.1
Describe the bug
When the struct under validation contains a pointer of UUID, the Validate function will fail. With error msg
To Reproduce
Expected behavior
Validate() should works fine without error
Screenshots
The text was updated successfully, but these errors were encountered: