diff --git a/frontend/src/app/add-shows/_components/add-shows-form.tsx b/frontend/src/app/add-shows/_components/add-shows-form.tsx index 29a18ee..8be619f 100644 --- a/frontend/src/app/add-shows/_components/add-shows-form.tsx +++ b/frontend/src/app/add-shows/_components/add-shows-form.tsx @@ -28,7 +28,7 @@ export default function AddShowsForm() { formState: { errors, isDirty, isValid }, } = useForm({ resolver: zodResolver(addShowForm), - mode: "onBlur", + mode: "all", defaultValues: { title: "", description: "", diff --git a/frontend/src/app/add-shows/_components/basic-info.tsx b/frontend/src/app/add-shows/_components/basic-info.tsx index 6bea49b..b5b22b7 100644 --- a/frontend/src/app/add-shows/_components/basic-info.tsx +++ b/frontend/src/app/add-shows/_components/basic-info.tsx @@ -45,7 +45,7 @@ export default function BasicInfo({ register, errors }: BasicInfoProps) { ( ) => { const [inputType, setInputType] = useState(type); const { value: isVisible, handleToggle } = useToggle(); - const inputId = id || `input-${Math.random().toString(36).substr(2, 9)}`; + const generatedId = useId(); + const inputId = id || `input-${generatedId}`; const handleClickVisible = () => { handleToggle();