![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
zee-validator
Advanced tools
A model-based form validation library for vue inspired by vuelidate and vee-validate.
zee-validator is a model-based form validation library for Vue.js inspired by Vuelidate and VeeValidate. Unlike Vuelidate and VeeValidate, zee-validator is meant to be used as a mixin rather than as a plugin.
npm install zee-validator --save
yarn add zee-validator
zee-validator is a model-based, template-independent validation library,
which means that it is completely decoupled from how you build your templates.
In order to use your component has to define a validation
option object
defining the validation rules for your form(s):
<template>
<div id="vue-app">
<form>
<input name="fullName" type="text" v-model="fullName" />
<input name="birthday" type="text" v-model="birthday" />
</form>
</div>
<template>
<script>
import FormValidator from 'zee-validate'
export default {
mixins: [ FormValidator ],
data () {
return {
fullName: '',
birthday: ''
}
}
validations: {
fullName: 'required',
birthday: 'required|date_format:DD/MM/YYYY'
}
}
<script>
The name
attribute on the <input />
fields here is necessary for the mixin
to be able to listen for certain events on the form elements. The name
attribute is only necessary on the <form>
tag when using scoped forms:
<template>
<div id="vue-app">
<form name="formOne">
<input name="fullName" type="text" v-model="formOne.fullName" />
<input name="birthday" type="text" v-model="formOne.birthday" />
</form>
<form name="formTwo">
<input name="fullName" type="text" v-model="formTwo.fullName" />
<input name="birthday" type="text" v-model="formTwo.birthday" />
<input name="age" type="number" v-model="formTwo.age" />
</form>
</div>
<template>
<script>
import FormValidator from 'zee-validate'
export default {
mixins: [ FormValidator ],
data () {
return {
formOne: {
fullName: '',
birthday: ''
},
formTwo: {
fullName: '',
birthday: ''
}
}
}
validations: {
formOne: {
fullName: 'required',
birthday: 'required|date_format:DD/MM/YYYY'
},
formTwo: {
fullName: 'required',
birthday: 'required|date_format:DD/MM/YYYY'
age: 'numeric'
}
}
}
<script>
Implement rules
Implement unit tests
Improve project documentation
Implement option to customize validation error messages
Implement Vue directive
FAQs
A model-based form validation library for vue inspired by vuelidate and vee-validate.
We found that zee-validator 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
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.