govalidator
govalidator copied to clipboard
Suggestion: Using UUID type for uuid validation
The current uuid validation functions accepts string type but the UUID should be 128 bit(16 byte) as defined in RFC 4122. I have tried to implement a custom validator to handle UUID type from google/uuid but I have run into another problem: it will fail the validator.ValidateStruct() as it will be considered as an empty byte.
e.g. bd67e368-463b-4edd-841d-099025fa1400
(00
will trigger the problem).
Do we have a better solution to validate the uuid or byte array? I can help with the Pull Request if necessary.
Hello guys! I forked this package cause owner disappeared. Hope, he will be back, but it would be easier to merge these changes back if he is back Link to my repo: create issue there and we'll discuss it.