Open imcvampire opened 9 months ago
Are you sure you read the documentation? https://pkg.go.dev/github.com/go-playground/validator/v10#hdr-Universally_Unique_Identifier_UUID
The docs clearly state the uuid validation is for strings.
I have to assume the pgtype.UUID is this one, because the example is incomplete, and it is a struct, not a string https://github.com/jackc/pgx/blob/master/pgtype/uuid.go#L18
For making this work for you please look at the full example here, which shows how to use the built-in SQL null types, which is similar to how you would have to handle this custom type converting to a string prior to validation or by creating your own custom validation https://github.com/go-playground/validator/blob/master/_examples/custom/main.go
Hi @deankarn, maybe I missed something but that code works with 10.15.1. It only starts throwing error from 10.15.2.
Package version eg. v9, v10:
10.15.4, 10.15.5
Issue, Question or Enhancement:
uuid
tag failed even with a valid uuid17155752-47ec-4cc7-bbd1-4f40cde61a7b
Code sample, to showcase or reproduce: