From b1ffc9a8a5b07bc5358f354877ca5efc33131ddc Mon Sep 17 00:00:00 2001 From: vigdorov Date: Sat, 8 Aug 2020 09:35:14 +0300 Subject: [PATCH] =?UTF-8?q?HM-119.=20=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=D0=B0=20=D0=B2=D0=B0=D0=BB=D0=B8=D0=B4=D0=B0=D1=86?= =?UTF-8?q?=D0=B8=D1=8F=20key=20=D0=BF=D1=80=D0=B8=20=D1=81=D0=BE=D0=B7?= =?UTF-8?q?=D0=B4=D0=B0=D0=BD=D0=B8=D0=B8=20=D1=85=D1=80=D0=B0=D0=BD=D0=B8?= =?UTF-8?q?=D0=BB=D0=B8=D1=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- http/store.http | 2 +- src/store/store.schema.ts | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) 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;