From 425ff46fa1f3b1516d8dbc73c066359a8df6e7dd Mon Sep 17 00:00:00 2001 From: BhagyahsreeMatere Date: Thu, 12 Sep 2024 18:43:00 +0530 Subject: [PATCH 1/2] Fixed name error validation --- ui/src/components/Modal/index.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ui/src/components/Modal/index.tsx b/ui/src/components/Modal/index.tsx index cdc8d3176..35795aa26 100644 --- a/ui/src/components/Modal/index.tsx +++ b/ui/src/components/Modal/index.tsx @@ -58,9 +58,9 @@ const Modal = (props: ProjectModalProps) => { if (!value) { setInputValue(false); return; - } else if (!/^[^\s].+$/.test(value)) { + } else if (!/^[^\s].*$/.test(value)) { setInputValue(false); - return 'Please enter project name.'; + return 'Please enter a valid project name.'; } else if (value && value?.length > 200) { setInputValue(false); return 'Project Name should not be more than 200 chars'; From 30b5d158023ab1e19f1dee61a00f3ca5f79267c2 Mon Sep 17 00:00:00 2001 From: BhagyahsreeMatere Date: Thu, 12 Sep 2024 18:54:23 +0530 Subject: [PATCH 2/2] Fixed name error validation message --- ui/src/components/Modal/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/src/components/Modal/index.tsx b/ui/src/components/Modal/index.tsx index 35795aa26..a2c0aa628 100644 --- a/ui/src/components/Modal/index.tsx +++ b/ui/src/components/Modal/index.tsx @@ -60,7 +60,7 @@ const Modal = (props: ProjectModalProps) => { return; } else if (!/^[^\s].*$/.test(value)) { setInputValue(false); - return 'Please enter a valid project name.'; + return 'Please enter project name.'; } else if (value && value?.length > 200) { setInputValue(false); return 'Project Name should not be more than 200 chars';