From 6e5957a01aa14f39275d42a00d2ac93144ba2cc1 Mon Sep 17 00:00:00 2001 From: Rory Powell Date: Thu, 20 Jan 2022 16:25:09 +0000 Subject: [PATCH] validator tweak --- packages/builder/src/helpers/validation/yup/app.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/packages/builder/src/helpers/validation/yup/app.js b/packages/builder/src/helpers/validation/yup/app.js index d89eb72db8..3a2228d78a 100644 --- a/packages/builder/src/helpers/validation/yup/app.js +++ b/packages/builder/src/helpers/validation/yup/app.js @@ -63,7 +63,14 @@ export const url = (validation, { apps, currentApp } = { apps: {} }) => { if (!value) { return true } - return value.startsWith("/") && value.length > 1 + // make it clear that this is a url path and cannot be a full url + return ( + value.startsWith("/") && + !value.includes("http") && + !value.includes("www") && + !value.includes(".") && + value.length > 1 // just '/' is not valid + ) }) ) }