Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
vue-validity
Advanced tools
Simple, powerful and flexible model-based Vue.js validation library
A simple, powerful and flexible validation library for Vue.js 2.0.
npm install --save vue-validity
import Vue from 'vue'
import Validity from 'vue-validity'
// Optionally provide configuration options.
Vue.use(Validity, {})
For each value you want to validate, you have to create a key inside validations options.
export default {
data () {
return {
name: ''
}
},
validations: {
name: ['required', 'minlength:4']
}
}
This will result in the following validation object:
$v: {
"name": {
"required": {
"$value": false,
"$message": "name is required."
},
"minlength": {
"$value": true,
"$message": "name should be at least 4 chars."
},
"$valid": false,
"$dirty": false,
"$error": false,
"$errors": []
},
"$valid": false,
"$dirty": false,
"$error": false,
"$errors": []
}
Checkout the docs for more examples: https://jrenton.github.io/vue-validity/
# install dependencies
npm install
# serve with hot reload at localhost:8080
npm run dev
# build for production with minification
npm run build
Original vuelidate work Copyright (c) 2016 Paweł Grabarz & Damian Dulisz
FAQs
Simple, powerful and flexible model-based Vue.js validation library
We found that vue-validity demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.