fix regex matching in app and function services

This commit is contained in:
Asim Aslam
2022-03-03 15:41:11 +00:00
parent ec9b7893b1
commit d3f6d73788
2 changed files with 3 additions and 3 deletions

View File

@@ -23,7 +23,7 @@ var (
OwnerKey = "app/owner/"
ServiceKey = "app/service/"
ReservationKey = "app/reservation/"
NameFormat = regexp.MustCompilePOSIX("[a-z0-9]+")
NameFormat = regexp.MustCompilePOSIX("^[a-z0-9]+$")
)
type Reservation struct {

View File

@@ -5,8 +5,8 @@ import (
)
var (
IDFormat = regexp.MustCompilePOSIX("[a-z0-9-]+")
NameFormat = regexp.MustCompilePOSIX("[a-z0-9]+")
IDFormat = regexp.MustCompilePOSIX("^[a-z0-9-]+$")
NameFormat = regexp.MustCompilePOSIX("^[a-z0-9]+$")
FunctionKey = "function/func/"
OwnerKey = "function/owner/"