Skip to content

The Open Source DocuSign Alternative.

feat: add error message to signature pad

PeterKwesiAnsah6b250b88ec5a
diff --git a/apps/web/src/components/forms/profile.tsx b/apps/web/src/components/forms/profile.tsx
index d65a0ce27..5b4045abb 100644
--- a/apps/web/src/components/forms/profile.tsx
+++ b/apps/web/src/components/forms/profile.tsx
@@ -21,7 +21,7 @@ import { FormErrorMessage } from '../form/form-error-message';
export const ZProfileFormSchema = z.object({
name: z.string().min(1),
- signature: z.string().min(1),
+ signature: z.string().min(1, 'Signature Pad cannot be empty'),
});
export type TProfileFormSchema = z.infer<typeof ZProfileFormSchema>;
@@ -122,6 +122,7 @@ export const ProfileForm = ({ className, user }: ProfileFormProps) => {
/>
)}
/>
+ <FormErrorMessage className="mt-1.5" error={errors.signature} />
</div>
</div>