diff --git a/ui/src/router/components/form/validation/schema.js b/ui/src/router/components/form/validation/schema.js index 697019f85..f5620703f 100644 --- a/ui/src/router/components/form/validation/schema.js +++ b/ui/src/router/components/form/validation/schema.js @@ -92,7 +92,8 @@ const routerNameRegex = /^[a-z0-9-]*$/, kafkaBrokersRegex = /^([a-z]+:\/\/)?\[?([0-9a-zA-Z\-%._:]*)\]?:([0-9]+)(,([a-z]+:\/\/)?\[?([0-9a-zA-Z\-%._:]*)\]?:([0-9]+))*$/i, kafkaTopicRegex = /^[A-Za-z0-9_.-]{1,249}/i, - trafficRuleNameRegex = /^[A-Za-z\d][\w\d \-()#$%&:.]*[\w\d\-()#$%&:.]$/; + trafficRuleNameRegex = /^[A-Za-z\d][\w\d \-()#$%&:.]*[\w\d\-()#$%&:.]$/, + routeNamePathRegex = /^[\w\-]*(?:\.[\w\-]+)*$/; const timeoutSchema = yup .string() @@ -249,6 +250,7 @@ const mappingSchema = yup.object().shape({ const standardEnsemblerConfigSchema = yup.object().shape({ experiment_mappings: yup.array(mappingSchema), + route_name_path: yup.string().matches(routeNamePathRegex, "Route name path needs to be a valid period-delimited path"), fallback_response_route_id: validRouteSchema, });