From 04f57087accd84aa2bcfffcf0440631ec9f85635 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aleksa=20Siri=C5=A1ki?= <31509435+aleksasiriski@users.noreply.github.com> Date: Sun, 15 Dec 2024 20:44:43 +0100 Subject: [PATCH] fix(regexp): polj index --- src/lib/utils/regexp.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/utils/regexp.ts b/src/lib/utils/regexp.ts index 0ce3908..8caae30 100644 --- a/src/lib/utils/regexp.ts +++ b/src/lib/utils/regexp.ts @@ -2,7 +2,7 @@ export const nameRegExp = /^[a-zA-ZčČćĆdžDŽđĐšŠžŽ]+(?:(?:\s|-)[a-zA-Z export const nameRegExpMsg = 'String must be one word or two words with space or dash (-) in between'; -export const indexRegExp = /^\d{1,4}[a-zA-Z]?\/(?:\d{2}|\d{4})$/; +export const indexRegExp = /^\d{1,4}[a-zA-Z]?\/(?:\d{2}|\d{4})(?:[A-Z]{1,3})?$/; export const indexRegExpMsg = 'String must be in format: 1-4 numbers, optional single character and 2 or 4 numbers (year)';