diff --git a/regexes.go b/regexes.go index af98d8daa..c67927a53 100644 --- a/regexes.go +++ b/regexes.go @@ -31,7 +31,7 @@ const ( uUID4RFC4122RegexString = "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$" uUID5RFC4122RegexString = "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-5[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$" uUIDRFC4122RegexString = "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" - uLIDRegexString = "^[A-HJKMNP-TV-Z0-9]{26}$" + uLIDRegexString = "^(?i)[A-HJKMNP-TV-Z0-9]{26}$" md4RegexString = "^[0-9a-f]{32}$" md5RegexString = "^[0-9a-f]{32}$" sha256RegexString = "^[0-9a-f]{64}$" diff --git a/validator_test.go b/validator_test.go index 3b6d26348..ab95f8406 100644 --- a/validator_test.go +++ b/validator_test.go @@ -4338,7 +4338,7 @@ func TestULIDValidation(t *testing.T) { }{ {"", false}, {"01BX5ZZKBKACT-V9WEVGEMMVRZ", false}, - {"01bx5zzkbkactav9wevgemmvrz", false}, + {"01bx5zzkbkactav9wevgemmvrz", true}, {"a987Fbc9-4bed-3078-cf07-9141ba07c9f3xxx", false}, {"01BX5ZZKBKACTAV9WEVGEMMVRZABC", false}, {"01BX5ZZKBKACTAV9WEVGEMMVRZABC", false},