diff --git a/http/store.http b/http/store.http index deafc70..f0ae021 100644 --- a/http/store.http +++ b/http/store.http @@ -12,7 +12,7 @@ content-type: application/json Api-Name: store-service-test { - "key": "testApi-455", + "key": "teFDfd4_fd-g53", "value": { }, diff --git a/src/store/store.schema.ts b/src/store/store.schema.ts index bf42caf..454a14f 100644 --- a/src/store/store.schema.ts +++ b/src/store/store.schema.ts @@ -25,6 +25,8 @@ export class Store extends Document { required: true, unique: true, type: String, + minlength: 6, + validate: new RegExp(/^[a-zA-Z][a-zA-Z0-9_-]*$/) }) key: string;