This commit is contained in:
Nurlygayanova Ekaterina
2026-11-05 19:36:11 +03:00
parent ec540a1a72
commit 354385e5f7
142 changed files with 13470 additions and 17 deletions
+12
View File
@@ -0,0 +1,12 @@
package validate
import "regexp"
var idempotencyKeyPattern = regexp.MustCompile(`^[A-Za-z0-9._:-]{1,128}$`)
func IdempotencyKey(s string) error {
if !idempotencyKeyPattern.MatchString(s) {
return newError("Idempotency-Key", "must match [A-Za-z0-9._:-]{1,128}")
}
return nil
}