From 59b5715ebb3e1fd7bd4eb02ce50399715734f865 Mon Sep 17 00:00:00 2001 From: 0-Zz-ang Date: Mon, 4 Aug 2025 14:59:15 +0900 Subject: (박서영) docu-list-rule detail sheet 컴포넌트 추가 및 검색 필터 기능 오류 수정 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../code-groups/table/code-groups-edit-sheet.tsx | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'lib/docu-list-rule/code-groups/table/code-groups-edit-sheet.tsx') diff --git a/lib/docu-list-rule/code-groups/table/code-groups-edit-sheet.tsx b/lib/docu-list-rule/code-groups/table/code-groups-edit-sheet.tsx index 28aebd54..74ebc05a 100644 --- a/lib/docu-list-rule/code-groups/table/code-groups-edit-sheet.tsx +++ b/lib/docu-list-rule/code-groups/table/code-groups-edit-sheet.tsx @@ -19,6 +19,7 @@ import { import { Form, FormControl, + FormDescription, FormField, FormItem, FormLabel, @@ -41,8 +42,8 @@ const updateCodeGroupSchema = z.object({ description: z.string().min(1, "Description은 필수입니다."), codeFormat: z.string().optional().refine((val) => { if (!val) return true; // 빈 값은 허용 - return /^[AN]*$/.test(val); - }, "Code Format은 A(영어 대문자) 또는 N(숫자)만 입력 가능합니다."), + return /^[ANX]*$/.test(val); + }, "Code Format은 A(영어 대문자), N(숫자), X(영어/숫자)만 입력 가능합니다."), controlType: z.string().min(1, "Control Type은 필수입니다."), isActive: z.boolean().default(true), }) @@ -92,6 +93,8 @@ export function CodeGroupsEditSheet({ expression += `[A-Z]{${count}}` } else if (currentChar === 'N') { expression += `[0-9]{${count}}` + } else if (currentChar === 'X') { + expression += `[A-Z0-9]{${count}}` } currentChar = codeFormat[i] count = 1 @@ -103,6 +106,8 @@ export function CodeGroupsEditSheet({ expression += `[A-Z]{${count}}` } else if (currentChar === 'N') { expression += `[0-9]{${count}}` + } else if (currentChar === 'X') { + expression += `[A-Z0-9]{${count}}` } expression += '$' @@ -183,11 +188,14 @@ export function CodeGroupsEditSheet({ Code Format form.trigger('codeFormat')} /> + + A: 영어 대문자, N: 숫자, X: 영어 대문자 또는 숫자 + )} -- cgit v1.2.3