diff --git a/app/handler/app.go b/app/handler/app.go index 14ffe12..3b5302c 100644 --- a/app/handler/app.go +++ b/app/handler/app.go @@ -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 { diff --git a/function/handler/function.go b/function/handler/function.go index e2ea65c..2b87775 100644 --- a/function/handler/function.go +++ b/function/handler/function.go @@ -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/"