simple-vue3-validator

lightweight yet flexible validation lib for vue.js - fork of simple-vue-validator
9,899 8
Install
npm install simple-vue3-validator
Latest Version:1.0.0-beta.2
Vue:3
License:MIT
Last Updated:May 30, 2021
Links: GitHub  ·  npm
Maintainer: rak-phillip

Simple Vue 3 Validator

Simple Vue 3 validator is a lightweight yet flexible plugin for Vue.js 3.0 that allows you to validate input fields, and display errors. It watches changes of your model data, validates them, and informs you with the validation result.

It supports the following features:

  • Fully customized validation rules.
  • Cross field validation.
  • Async/ajax validation (with supports of loading indicator, result caching, debounced user input).
  • Validating custom component.
  • Dynamic form / multiple validation instances.

Documentation

COMING SOON ⌚

Installation

Package is installable via npm.

npm install --save simple-vue3-validator

You can also install it via bower.

bower install --save simple-vue3-validator

NOTE

  • Bower installation is untested as of 2021/05/30
  • For bower package, please use /dist/plugin.js

Configuration

import { createApp } from 'vue'
import App from './App.vue'
import SimpleVueValidator from 'simple-vue3-validator'

const app = createApp(App)
  .use(SimpleVueValidator)

Basic Usage

Define the validators object in your vue / component instance:

validators: {
      email (value) {
        return Validator.value(value).required().email();
      }
    }

In the template HTML use the validation object injected by the library to display validation status / results.

<div class="message">{{ validation.firstError('email') }}</div>

NOTE

Full documentation coming soon ⌚

license MIT

Related Packages

simple-vue-validator

lightweight yet flexible validation lib for vue.js

96,321 289
vue-validus

Extensible lightweight validation library for Vue

1,431 6
vue-dog-form

The simplest vue 3 form validation plugin.

65,599 8
vue-form-2

Vue.js 2 form component

16,113 55

Version History

Pre-releases (3)
Version Released Vue License
1.0.0-beta.2 ^3.0.0-0 MIT
1.0.0-beta.1 ^3.0.0-0 MIT
1.0.0-beta.0 ^3.0.0-0 MIT