This commit is contained in:
Nurlygayanova Ekaterina
2026-11-05 17:56:30 +03:00
parent 0ab3a341aa
commit 1c95e2e68e
178 changed files with 21135 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
}