feat: Update modal validation design and behavior

- Changed the modal validation mechanism to focus on the first empty required field and display a toast notification prompting the user to fill it.
- Removed the disabling of the save button, ensuring it remains active regardless of validation state.
- Enhanced visual feedback with a shake animation for empty fields and a red border to indicate errors.
- Updated the documentation to reflect the new validation flow and requirements.

Made-with: Cursor
This commit is contained in:
2026-03-03 18:30:56 +09:00
parent dfc495d32b
commit 35dfe5bd79
5 changed files with 226 additions and 273 deletions

View File

@@ -196,7 +196,7 @@ const TextInput = forwardRef<
const hasError = hasBlurred && !!validationError;
return (
<div className="flex h-full w-full flex-col">
<div className="relative h-full w-full">
<Input
ref={ref}
type="text"
@@ -214,7 +214,7 @@ const TextInput = forwardRef<
style={inputStyle}
/>
{hasError && (
<p className="text-destructive mt-1 text-[11px]">{validationError}</p>
<p className="text-destructive absolute left-0 top-full mt-0.5 text-[11px]">{validationError}</p>
)}
</div>
);