From f4b1a770184e8647e0b3042a52a1bcc6f9cf00ce Mon Sep 17 00:00:00 2001
From: joonhoekim <26rote@gmail.com>
Date: Wed, 12 Nov 2025 17:49:57 +0900
Subject: (김준회) SWP: 파일 업로드시 Stage 검증 추가, DOC_CLASS 관리 단순화
 (코드 제거), DOC_CLASS 추가시 검증(A-Z0-9) 처리
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 .../table/document-class-add-dialog.tsx             | 21 ++++++++++++++++++---
 1 file changed, 18 insertions(+), 3 deletions(-)

(limited to 'lib/docu-list-rule/document-class/table/document-class-add-dialog.tsx')

diff --git a/lib/docu-list-rule/document-class/table/document-class-add-dialog.tsx b/lib/docu-list-rule/document-class/table/document-class-add-dialog.tsx
index e2cfc39e..6e8ac686 100644
--- a/lib/docu-list-rule/document-class/table/document-class-add-dialog.tsx
+++ b/lib/docu-list-rule/document-class/table/document-class-add-dialog.tsx
@@ -32,7 +32,10 @@ import { createDocumentClassCodeGroup } from "@/lib/docu-list-rule/document-clas
 import { useParams } from "next/navigation"
 
 const createDocumentClassSchema = z.object({
-  value: z.string().min(1, "Value는 필수입니다."),
+  value: z.string()
+    .min(1, "Value는 필수입니다.")
+    .max(1, "Value는 1자리만 입력 가능합니다. (예: A, B, 0, 1)")
+    .regex(/^[A-Z0-9]$/, "대문자 알파벳 또는 숫자 1자리만 입력 가능합니다. (예: A, B, 0, 1)"),
   description: z.string().optional(),
 })
 
@@ -117,8 +120,17 @@ export function DocumentClassAddDialog({
                 <FormItem>
                   <FormLabel>Value *</FormLabel>
                   <FormControl>
-                    <Input {...field} placeholder="예: A Class" />
+                    <Input 
+                      {...field} 
+                      placeholder="예: A" 
+                      maxLength={1}
+                      className="uppercase"
+                      onChange={(e) => field.onChange(e.target.value.toUpperCase())}
+                    />
                   </FormControl>
+                  <div className="text-xs text-muted-foreground mt-1">
+                    💡 대문자 알파벳 또는 숫자 1자리 (A, B, 0, 1 등) - API DOC_CLASS로 전송됩니다
+                  </div>
                   <FormMessage />
                 </FormItem>
               )}
@@ -131,8 +143,11 @@ export function DocumentClassAddDialog({
                 <FormItem>
                   <FormLabel>Description</FormLabel>
                   <FormControl>
-                    <Input {...field} placeholder="예: A Class Description (선택사항)" />
+                    <Input {...field} placeholder="예: General Documents (선택사항)" />
                   </FormControl>
+                  <div className="text-xs text-muted-foreground mt-1">
+                    선택사항: Document Class에 대한 추가 설명
+                  </div>
                   <FormMessage />
                 </FormItem>
               )}
-- 
cgit v1.2.3

