Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/QingWei-Li/vuerify
🚩Validation plugin for Vue.js
https://github.com/QingWei-Li/vuerify
Last synced: 24 days ago
JSON representation
🚩Validation plugin for Vue.js
- Host: GitHub
- URL: https://github.com/QingWei-Li/vuerify
- Owner: QingWei-Li
- License: wtfpl
- Created: 2016-07-08T03:56:35.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2020-06-21T07:54:34.000Z (about 4 years ago)
- Last Synced: 2024-04-14T02:33:30.883Z (2 months ago)
- Language: JavaScript
- Homepage: https://cinwell.com/vuerify/
- Size: 195 KB
- Stars: 191
- Watchers: 10
- Forks: 49
- Open Issues: 11
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Lists
- awesome-vuejs - Vuerify - Validation plugin for Vue.js (Awesome Vue.js / Libraries & Plugins)
- awesome-vue-refactor - Vuerify
README
# Vuerify
[![Build Status](https://travis-ci.org/QingWei-Li/vuerify.svg?branch=master)](https://travis-ci.org/QingWei-Li/vuerify)
[![npm](https://img.shields.io/npm/v/vuerify.svg?maxAge=3600)](https://www.npmjs.com/package/vuerify)
[![Coverage Status](https://coveralls.io/repos/github/QingWei-Li/vuerify/badge.svg?branch=master)](https://coveralls.io/github/QingWei-Li/vuerify?branch=master)
![badge-size](https://badge-size.herokuapp.com/qingwei-li/vuerify/master/dist/vuerify.min.js?compression=gzip)> Validation plugin for Vue.js
## Features
- Supports both Vue 1.x and 2.0
- Compact
- Simple## Demo
- [basic](https://qingwei-li.github.io/vuerify/signup)
- [directive](https://qingwei-li.github.io/vuerify/directive)
- [directive for Vue2.0](https://qingwei-li.github.io/vuerify/directive-next)
- [mint-ui](https://qingwei-li.github.io/vuerify/mint-ui)## Docs
- [中文文档](https://github.com/QingWei-Li/vuerify/wiki/%E5%B8%AE%E5%8A%A9%E6%96%87%E6%A1%A3)## Installation
```shell
npm i vuerify -S
```install directive
```shell
# Vue 1.x
npm i v-vuerify -S# Vue 2.x
npm i v-vuerify-next -S
```## Usage
```javascript
import Vue from 'vue'
import Vuerify from 'vuerify'Vue.use(Vuerify /*, add rules */)
```component
```javascript
{
template: `
`,
data () {
return {
username: '',
password: '',
conform: ''
}
},
vuerify: {
username: 'required',
password: {
test: /\w{4,}/,
message: '至少四位字符'
},
conform: {
test (val) {
return val === this.password
},
message: '密码输入不一致'
}
},
computed: {
errors () {
return this.$vuerify.$errors
}
},
methods: {
handleSubmit () {
if (this.$vuerify.check()) {
// do sth
}
}
}
}
```
## Development
```shell
npm install
npm run dev
```
## TODO
- English Documentation
## License
WTFPL