Fix/issue 1550 UUID case insensitive - #1551
Merged
nodivbyzero merged 2 commits intoApr 6, 2026
Merged
Conversation
bfabio
pushed a commit
to bfabio/validator
that referenced
this pull request
Apr 8, 2026
## Fixes Or Enhances Resolves go-playground#1550 The `uUIDRegexString` regex only matched lowercase hex digits (a-f), causing valid UUIDs containing uppercase letters (e.g., `2830923A-E5F5-4178-9700-787586673E0D`) to fail validation. UUIDs are case-insensitive per RFC 4122, so both cases should be accepted. - Updated `uUIDRegexString` to accept both uppercase and lowercase hex characters (a-fA-F), aligning it with the behaviour of `uUIDRFC4122RegexString`. - Added a test to cover UUID validation with uppercase hex digits. - Manually tested against the example in the issue and the expected behaviour is now observed. **Make sure that you've checked the boxes below before you submit PR:** - [x] Tests exist or have been written that cover this particular change. @go-playground/validator-maintainers
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes Or Enhances
Resolves #1550
The
uUIDRegexStringregex only matched lowercase hex digits (a-f), causing valid UUIDs containing uppercase letters (e.g.,2830923A-E5F5-4178-9700-787586673E0D) to fail validation. UUIDs are case-insensitive per RFC 4122, so both cases should be accepted.uUIDRegexStringto accept both uppercase and lowercase hex characters (a-fA-F), aligning it with the behaviour ofuUIDRFC4122RegexString.Make sure that you've checked the boxes below before you submit PR:
@go-playground/validator-maintainers