diff --git a/backend/internal/app/validator/field/regex.go b/backend/internal/app/validator/field/regex.go index 7e7b3536..5816c521 100644 --- a/backend/internal/app/validator/field/regex.go +++ b/backend/internal/app/validator/field/regex.go @@ -7,5 +7,5 @@ package field import "regexp" var ( - versionRegexSemantic = regexp.MustCompile(`^\d+\.\d+\.\d+$`) + versionRegexSemantic = regexp.MustCompile(`^(?P0|[1-9]\d*)\.(?P0|[1-9]\d*)\.(?P0|[1-9]\d*)(?:-(?P(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+(?P[0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$`) )