A lightweight, customizable, extensible, mobile-friendly form validator that supports real-time, async, and ajax validation.
How to use it:
1. Import and register the component.
import Vue from "vue; import validator from @mediv0/validator;
Vue.use(validator, options);
2. Attach the form validator to input fields using the v-validator
directive.
<input v-validator="validatorOptions" />
export default { data(){ return { validatorOptions: { ... } } } }
3. Possible validator options.
key?: string; hideLines?: boolean; hideLabels?: boolean; circleSize?: number; disable?: boolean; debounce?: number; items: checkPropertyItemsType; onError?: IonError; onSuccess?: Function;
4. Possible plugin options.
Vue.use(validator, { name: "validator", success: "#2DE68F", failed: "#979797", unchecked: "#FF4343" });
Preview:
Download Details:
Author: mediv0
Live Demo: https://codesandbox.io/s/vue-inuput-validator-nphgg?file=/src/App.vue
Download Link: https://github.com/mediv0/vue-input-validator/archive/master.zip
Official Website: https://github.com/mediv0/vue-input-validator
Install & Download:
# Yarn
$ yarn add @mediv0/validator
# NPM
$ npm i @mediv0/validator