How to change the Vee-Validate default error messages?

0

Issue

Using Vue.js and Vee-Validate, how can I change the default error messages?

Vee-Validate Example Demos

Out of the box, for the required message, it will display, “The <fieldname> field is required.” But I just want all fields that are required to display “Required” instead. I know I can override individual fields but I just want to globally override any field that displays a required error to display “Required”.

Solution

Have a look at Field-specific Custom Messages in the official documentation.

You basically have to provide a custom dict for each language you want to override.

Answered By – chrisg86

This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0

Leave A Reply

Your email address will not be published.

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept Read More