From 872c7555b5d2b711e9250ddfe8ee39e3e98023af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Cornet?= Date: Tue, 12 Nov 2024 12:17:04 -0500 Subject: [PATCH] Make ticker symbol regexp more tolerant --- src/pages/activity/import/utils/csvValidation.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/activity/import/utils/csvValidation.ts b/src/pages/activity/import/utils/csvValidation.ts index fe4ad86..f07437c 100644 --- a/src/pages/activity/import/utils/csvValidation.ts +++ b/src/pages/activity/import/utils/csvValidation.ts @@ -81,7 +81,7 @@ const CASH_ACTIVITY_TYPES = new Set([ ]); // Add a simple regex for ticker validation -const tickerRegex = /^(\$CASH-[A-Z]{3}|[A-Z0-9]{1,5}([.-][A-Z0-9]+)?)$/; +const tickerRegex = /^(\$CASH-[A-Z]{3}|[A-Z0-9]{1,10}([\.-][A-Z0-9]+){0,2})$/; export const activityImportValidationSchema = z .object({