diff --git a/packages/ui/Input/TextField.tsx b/packages/ui/Input/TextField.tsx index 959a808..683079e 100644 --- a/packages/ui/Input/TextField.tsx +++ b/packages/ui/Input/TextField.tsx @@ -10,7 +10,7 @@ interface TextFieldProps extends Omit, descriptionText?: string; required?: boolean; errorMessage?: string; - value: T; + value?: T; // isError -> validationFn 순서로 적용 isError?: boolean; validationFn?: (input: T) => boolean; @@ -34,7 +34,7 @@ function TextField(props: TextFieldProps) { const hasError = () => { if (inputProps.disabled || inputProps.readOnly) return false; if (isError !== undefined) return isError; - if (validationFn && !validationFn(value)) return true; + if (validationFn && value && !validationFn(value)) return true; return false; };