All Projects → cj → Vuelidation

cj / Vuelidation

Licence: mit
simple, powerful, vuejs validation.

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Vuelidation

Validate
A simple jQuery plugin to validate forms.
Stars: ✭ 298 (+684.21%)
Mutual labels:  validation, form
Validator.js
⁉️轻量级的 JavaScript 表单验证,字符串验证。没有依赖,支持 UMD ,~3kb。
Stars: ✭ 486 (+1178.95%)
Mutual labels:  validation, form
Approvejs
A simple JavaScript validation library that doesn't interfere
Stars: ✭ 336 (+784.21%)
Mutual labels:  validation, form
svelte-form
JSON Schema form for Svelte v3
Stars: ✭ 47 (+23.68%)
Mutual labels:  validation, form
Form Backend Validation
An easy way to validate forms using back end logic
Stars: ✭ 784 (+1963.16%)
Mutual labels:  validation, form
Vue Form Generator
📋 A schema-based form generator component for Vue.js
Stars: ✭ 2,853 (+7407.89%)
Mutual labels:  form, vuejs2
Bunny
BunnyJS - Lightweight native (vanilla) JavaScript (JS) and ECMAScript 6 (ES6) browser library, package of small stand-alone components without dependencies: FormData, upload, image preview, HTML5 validation, Autocomplete, Dropdown, Calendar, Datepicker, Ajax, Datatable, Pagination, URL, Template engine, Element positioning, smooth scrolling, routing, inversion of control and more. Simple syntax and architecture. Next generation jQuery and front-end framework. Documentation and examples available.
Stars: ✭ 473 (+1144.74%)
Mutual labels:  validation, form
react-native-validator-form
Simple validator for react-native forms.
Stars: ✭ 21 (-44.74%)
Mutual labels:  validation, form
Formsy React
A form input builder and validator for React JS
Stars: ✭ 708 (+1763.16%)
Mutual labels:  validation, form
Vue Form
Form validation for Vue.js 2.2+
Stars: ✭ 618 (+1526.32%)
Mutual labels:  validation, vuejs2
Fore
Fore - declarative programming with web components
Stars: ✭ 34 (-10.53%)
Mutual labels:  validation, form
Swiftyform
iOS framework for creating forms
Stars: ✭ 907 (+2286.84%)
Mutual labels:  validation, form
formalizer
React hooks based form validation made for humans.
Stars: ✭ 12 (-68.42%)
Mutual labels:  validation, form
Formvuelar
Vue form components with server-side validation in mind
Stars: ✭ 263 (+592.11%)
Mutual labels:  form, vuejs2
datalize
Parameter, query, form data validation and filtering for NodeJS.
Stars: ✭ 55 (+44.74%)
Mutual labels:  validation, form
React Hook Form
📋 React Hooks for form state management and validation (Web + React Native)
Stars: ✭ 24,831 (+65244.74%)
Mutual labels:  validation, form
Resolvers
📋 Validation resolvers: Zod, Yup, Joi, Superstruct, and Vest.
Stars: ✭ 222 (+484.21%)
Mutual labels:  validation, form
node-input-validator
Validation library for node.js
Stars: ✭ 74 (+94.74%)
Mutual labels:  validation, form
Vvalidator
🤖 An easy to use form validator for Kotlin & Android.
Stars: ✭ 592 (+1457.89%)
Mutual labels:  validation, form
React Final Form
🏁 High performance subscription-based form state management for React
Stars: ✭ 6,781 (+17744.74%)
Mutual labels:  validation, form

Vuelidation ✅

simple, powerful, vuejs validation.

Build Status Coverage Status Downloads Gitter License

Example

Install

yarn add --dev [email protected]

Include Plugin

import Vue from 'vue';
import Vuelidation from 'vuelidation';

Vue.use(Vuelidation);

Use

<script>
  new Vue({
    data () {
      return {
        name: '',
      }
    },
    
    vuelidation: {
      data: {
        name: {
          required: true,
        },
      },
    },
    
    methods: {
      submit () {
        if (this.$vuelidation.valid()) {
          console.log(`Hello, ${this.name}!`)
        }
      }
    }
  })
</script>

<template>
  <form>
    <input type='text' v-model='name' />
    <div v-if='$vuelidation.error("name")'>{{ $vuelidation.error('name') }}</div>
    
    <button type="submit" :disabled="$vuelidation.errors()">Submit</button>
  </form>
</template>

Validations

alphabetic

  • Must be a alphabetic value
  • args: Boolean
{
  alphabetic: true,
}
alpha

  • Must only contain letters and numbers
  • args: Boolean
{
  alpha: true,
}
alphaDash

  • msg: Must only contain letters, numbers, underscores or dashes
  • arg: Boolean
{
  alphaDash: true,
}
alphaSpace

  • msg: Must only contain letters, numbers or spaces
  • arg: Boolean
{
  alphaSpace: true,
}
length

  • msg: Must be {{ length }} character(s)
  • arg: Number
{
  length: 16,
}
between

  • msg: Must be between {{ min }} and {{ max }}
  • arg: { min: Number, max: Number }
{
  between: {
    min: 5,
    max: 10,
  },
}
betweenLength

  • msg: Must have between {{ min }} and {{ max }} characters
  • arg: { min: Number, max: Number }
{
  betweenLength: {
    min: 8,
    max: 20,
  },
}
decimal

  • msg: Must be a decimal with {{ points }} points
  • arg: { points: *Number }
{
  decimal: {
    points: 2,
  },
}
email

  • msg: Not a valid email
  • arg: Boolean
{
  email: true,
}
includes

  • msg: {{ value }} is not one of the following: {{ values.join(", ") }}
  • arg: { includes: Array }
{
  includes: ['foo', 'bar'],
}
numeric

  • msg: Must be a numeric value
  • arg: Boolean
{
  numeric: true,
}
required

  • msg: Required
  • arg: Boolean
{
  required: true,
}

* - the arg is optional.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].