From c7f1ac2e871b2f30ad27ba75d7270bc145a620fb Mon Sep 17 00:00:00 2001 From: Kent Dong Date: Sat, 7 Oct 2023 04:53:15 -0500 Subject: [PATCH] fix: Add pattern validation to route name (#265) --- frontend/src/pages/route/components/RouteForm/index.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/frontend/src/pages/route/components/RouteForm/index.tsx b/frontend/src/pages/route/components/RouteForm/index.tsx index 9334bd0b..403e14e3 100644 --- a/frontend/src/pages/route/components/RouteForm/index.tsx +++ b/frontend/src/pages/route/components/RouteForm/index.tsx @@ -103,6 +103,7 @@ const RouteForm: React.FC = forwardRef((props, ref) => { rules={[ { required: true, + pattern: /^[a-z0-9][a-z0-9.-]*$/, message: t('route.routeForm.routeNameRequired'), }, ]}