1.0.1 • Published 5 years ago

vue-gk-validator v1.0.1

Weekly downloads
4
License
ISC
Repository
-
Last release
5 years ago

vue-gk-validator

A test package with validation library based on custom requirements

Features

  • validates native types and emails

Usage

The main function is validate:

import VueGkValidate from 'vue-gk-validator'
export default {
  data () {
    return {
      user:{
        email: 'info@exxample.com'
      }
    }
  },
  methods: {
    addUser () {
      if (VueGkValidate.validate('email', this.user.email)) {
        console.log('is a valid email')
      }
    }
  }
}

returns a Boolean

License

The MIT License (MIT)