Defining your form validation with VeeValidate
A form is never complete until there is some sort of validation. The values of the form are sent to our servers, and we want to make sure that our forms can help the user with immediate feedback if any of the field values are incorrect.
In our case, the form we used in Figure 12.2 would have failed backend validation as the email was not in the correct format. In this section, we are going to learn how to create custom validation and introduce another supporting package offered by VeeValidate that includes a preset group of validation rules to speed up our development.
Frontend validation is not enough
Remember that frontend validation like the one performed by VeeValidate is just going to improve the UX but it is not secure enough as it can easily be bypassed. When working with forms, you should also define validation on the backend. Using validation schemas that work on both the frontend and backend, such as Zod, can help.
...