New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

vue-validatejs

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vue-validatejs

A validation component based on validate.js library

latest
npmnpm
Version
1.0.2
Version published
Maintainers
1
Created
Source

vue-validatejs

This package is a validation component based on validate.js. It provides a simple and flexible way to validate and show error messages for individual properties.

Usage

Because it relies on validate.js, all examples about validations can be checked at their docs. To use this component you have to import it into your component.


  import VueValidate from 'vue-validatejs'
  
  export default {
    name: 'App',
    components: { VueValidate },

    data () {
      return { model: {}, validation: {name: {presence: {allowEmpty: false}}} }
    }
  }

Then in your html create a tag passing the model, the property to validate and the validation

<vue-validate :model="model" :validation="validation" property-name="name"></vue-validate>

And that's it. A error message will be generated if the field fail any validation.

FAQs

Package last updated on 04 Nov 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts