Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix validation errors for file types
  • Loading branch information
Tymmmy committed Feb 20, 2023
commit a017d154debd5f24f3cf30df23b635cecd0b9621
4 changes: 2 additions & 2 deletions packages/wallet/src/components/kyc/VerifyIdentityForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ export const VerifyIdentityForm = () => {
<FileUpload
label="Selfie image"
{...verifyIdentityForm.register('selfie')}
error={verifyIdentityForm.formState.errors.selfie?.message}
error={verifyIdentityForm.formState.errors.selfie?.message?.toString()}
/>
<span className="text-sm font-light text-brand-orange">
{verifyIdentityForm?.getValues('selfie')?.[0]?.name}
Expand All @@ -95,7 +95,7 @@ export const VerifyIdentityForm = () => {
<FileUpload
label="Front side ID"
{...verifyIdentityForm.register('frontSideID')}
error={verifyIdentityForm.formState.errors.frontSideID?.message}
error={verifyIdentityForm.formState.errors.frontSideID?.message?.toString()}
/>
<span className="text-sm font-light text-brand-orange">
{verifyIdentityForm?.getValues('frontSideID')?.[0]?.name}
Expand Down
2 changes: 1 addition & 1 deletion packages/wallet/src/ui/forms/FileUpload.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { FieldError } from './FieldError'

type FileUploadProps = {
label?: string
error?: any
error?: string
}

export const FileUpload = forwardRef<HTMLInputElement, FileUploadProps>(
Expand Down