Search code examples
javascriptvue.jsvee-validate

How to use builtin validation rules in VeeValidate 4?


I'm migrating from Vue 2 to Vue 3, therefore, I want use VeeValidate 4, but the docs say nothing about using builtin rules like min, max, alpha_spaces, etc.

Do I have to create my own validations?

Should I REALY use zod for that?

Is there any predefined rules or it was removed from VeeValidate?


Solution

  • The rules for Vee-Validate are in separated package. See the docs here. Then you can simply use the bind rules on Field of Vee-Validate to add the rules you imported with defineRule