Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Validating Form #18

Open
rnwonder opened this issue Apr 30, 2024 · 0 comments
Open

Validating Form #18

rnwonder opened this issue Apr 30, 2024 · 0 comments

Comments

@rnwonder
Copy link

Package version

1.8.0

Describe the bug

I can seem to validate files. The file key below throws a TS error

 Type VineMultipartFile is missing the following properties from type ConstructableSchema<any, any>: [OTYPE], [COTYPE], [PARSE]
const updateUserValidator = vine.compile(
  vine.object({
    firstName: vine.string().optional(),
    lastName: vine.string().optional(),
    middleName: vine.string().optional(),
    businessName: vine.string().optional(),
    phoneNumber: vine.string().optional(),
    address: vine.string().optional(),
    dateOfBirth: vine.string().optional(),
    file: vine.file({
      size: '5mb',
      extnames: ACCEPTED_IMAGE_TYPES,
    }),
  })
)

Reproduction repo

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant