Understanding Vee-Validate and Yup
Vee-Validate 4 is a form validation library that is compatible with Vue 3. With it, we can add components that will add validation to our forms on the frontend. We will use it with the Yup data validation library to create the form validation schema, which Vee-Validate can use for validation. With the Form
component, we can add a form that enables us to do form validation with Vee-Validate 4. Then, the Field
component can be used to validate the form control components that come with PrimeVue. It does this by wrapping around them and passing the slot props that come with the Field
components as props to the input components.
The Yup library will be used with Vee-Validate to let us validate form values easily without writing all the code from scratch. It lets us create form validation schema objects that we can pass into forms created with Vee-Validate to add form validation.