Skip to content

Method defineComponentBinds value does not have valid type #4421

@filipbekic01

Description

@filipbekic01

What happened?

Using Vue SFC TypeScript, composition API.

Schema

export const AddressDto = z.object({
  receipt: z.string().min(1).max(200)
});

Usage

...
const { defineComponentBinds } = useForm<AddressDtoType>({
  validationSchema: toTypedSchema(AddressDto)
});

const receipt = defineComponentBinds("receipt");

The problem is that receipt.value has no proper type in TypeScript.

image

I can't even use v-bind against my custom component because it does not recognize modelValue, I'm getting type errors.

Reproduction steps

No response

Version

Vue.js 3.x and vee-validate 4.x

What browsers are you seeing the problem on?

  • Firefox
  • Chrome
  • Safari
  • Microsoft Edge

Relevant log output

No response

Demo link

https://google.com

Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions