GithubHelp home page GithubHelp logo

superlanding / simple-vue-validator Goto Github PK

View Code? Open in Web Editor NEW

This project forked from semisleep/simple-vue-validator

0.0 1.0 0.0 3.47 MB

A simple yet flexible validator library for vue.js

License: MIT License

CSS 8.82% JavaScript 31.91% HTML 2.23% Vue 57.03%

simple-vue-validator's Introduction

Simple Vue Validator

Simple Vue validator is a lightweight yet flexible plugin for Vue.js 2.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

Please checkout the full documentation for more detail.

Installation

Package is installable via npm.

npm install --save simple-vue-validator

You can also install it via bower.

bower install --save simple-vue-validator

NOTE: for bower package, please use /dist/plugin.js.

Configuration

import Vue from 'vue';
import SimpleVueValidation from 'simple-vue-validator';
Vue.use(SimpleVueValidation);

Basic Usage

Define the validators object in your vue / component instance:

validators: {
      email: function (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>

Please checkout the full documentation for more detail.

license MIT

simple-vue-validator's People

Contributors

andersonaguiar avatar bdsoha avatar dasdaniel avatar jackypanster avatar jamesbrewerdev avatar naabster avatar semisleep avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.