From 79eef5bccff1d6f48c4e6a416f836af876659110 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miroslav=20=C5=A0ediv=C3=BD?= Date: Wed, 19 May 2021 22:44:50 +0200 Subject: [PATCH] client mounts: add absolutePath rule. --- client/src/components/RoomsCreate.vue | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/client/src/components/RoomsCreate.vue b/client/src/components/RoomsCreate.vue index 51fb08a..a40667c 100644 --- a/client/src/components/RoomsCreate.vue +++ b/client/src/components/RoomsCreate.vue @@ -218,6 +218,7 @@ label="Host path" :value="host_path" @input="$set(data.mounts, index, { host_path: $event, container_path })" + :rules="[ rules.absolutePath ]" autocomplete="off" > @@ -227,6 +228,7 @@ label="Container path" :value="container_path" @input="$set(data.mounts, index, { host_path, container_path: $event})" + :rules="[ rules.absolutePath ]" autocomplete="off" > @@ -308,6 +310,9 @@ export default class RoomsCreate extends Vue { slug(val: string) { return val && !/^[A-Za-z0-9-_.]+$/.test(val) ? 'Should only contain A-Z a-z 0-9 - _ .' : true }, + absolutePath(val: string) { + return val[0] !== "/" ? 'Must be absolute path, starting with /.' : true + } } get nekoImages() {