All PrimeVue form components are designed for seamless integration with the forms library. Instead of using the standard v-model, the name property is used to link a state object that tracks values, errors, and actions. The form component provides four key properties for state management.
Property | Description |
---|---|
v-slot="$form" | Exposes the main $form object that tracks the state management of the fields. |
initialValues | Specifies the default values to initiate the form with. |
resolver | The validation handler to implement validations or to bind a schema like Zod, Yup, Valibot and more. |
@submit | The event handler to execute when the form is submitted. |