Home > Web Front-end > JS Tutorial > body text

How to use Vee-Validate

小云云
Release: 2018-02-03 13:41:39
Original
1652 people have browsed it

This article mainly introduces to you the detailed explanation of how to use Vee-Validate. The editor thinks it is quite good, so I will share it with you now and give it as a reference. Let’s follow the editor to take a look, I hope it can help everyone.

Introduction:


##

npm install vee-validate --save
Copy after login

vue code:


##import VeeValidate from 'vee-validate'; import zh_CN from 'vee-validate/dist/locale/zh_CN'; //Introducing the Chinese package, the prompt information can be displayed in Chinese form import { Validator } from 'vee-validate'; Validator.addLocale(zh_CN); // Set the prompt information to be displayed in Chinese const config = { errorBagName: 'errors', fieldsBagName: 'fields', delay: 100, locale: 'zh_CN', strict: true, enableAutoClasses: true, events: 'blur', inject: true }; // Custom prompt information const dictionary = { zh_CN: { messages: { ip: () => 'ip format is incorrect

The above is the detailed content of How to use Vee-Validate. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!