
Research
Supply Chain Attack on Axios Pulls Malicious Dependency from npm
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.
djvalidatorvue
Advanced tools
The best and simplest model based validator for Vue 3, UI independent and no dependency
Version 1
THE SIMPLEST VUE VALIDATION LIBRARY!
DjValidatorVue is the most simple, flexible and quick to use library for vue validation, it does not depend on any UI. Available in English, Russian and Spanish.
npm install djvalidatorvue --save
import {validate} from 'djvalidatorvue'
//object to validate (simple object or reactive)
let mi_obj=reactive({
email:"",
username: "",
password: "",
obs:""
})
//declare object with validation instructions
const validations={
email:{rule:'email,50'},
obs:{req:true,rule:'text,5,150'},
username:{req:true,rule:'word,4,20'},
password:{req:true,rule:'word,6,20',msg:'invalid password'},
}
//declare object to contain errors
let errors=reactive({})
//To validate, use the validate method
function save(){
let resp=validate(mi_obj,validations,errors)
alert(resp)//true or false
}
//errors contains invalid feedback, to show:
<input type="text" v-model="mi_obj.email">
<span class="error" v-if="errors.email">{{errors.email}}</span>
//You can also use the built-in component (import {DjError} from 'djvalidatorvue')
<input type="text" v-model="mi_obj.email">
<DjError :error="errors.email"/>
You can validate just one field with validate_field, and it can be run attached to events like @blur.
//Validate only a field
import {validate_field} from 'djvalidatorvue'
function validate_email(){
let resp=validate_field('email',mi_obj,validations,errors)
//actions
}
<input type="text" v-model="mi_obj.email" @blur="validate_email">
<DjError :error="errors.email"/>
You can also validate individual variables with validate_var.
import {validate_var} from 'djvalidatorvue'
let error=ref(null)
funciton check(texto){
validate_var(texto,{req:true,rule:'text,5,150'},error)
}
To clear errors and stop displaying them you can use clean_errors.
import {clean_errors} from 'djvalidatorvue'
let errors=reactive({})
function open_form(){
clean_errors(errors)
}
Or empty the errors object manually
Add 'msg' in the validations object.
const validations={
username:{req:true,rule:'word,4,20'},
password:{req:true,rule:'word,6,20',msg:'invalid password'},
}
There are 2 css variables to change the style of the error message:
--dj-validator-error-color
--dj-validator-text-size
With regular expressions:
const validations={
mi_field:{req:true,rule:'regexp,^[aeiou]+$,i'},
}
With own functions:
const validations={
mi_field:{req:true,rule:'call',func:isUpperCase},
}
function isUpperCase(value,params){
return value==value.toUpperCase()
}
Adding a new rule:
import {add_validator} from 'djvalidatorvue'
add_validator('upper',isUpperCase,'text is not uppercase')
function isUpperCase(value,params){
return value==value.toUpperCase()
}
const validations={
mi_field:{req:true,rule:'upper'},
}
DjValidatorVue was written by David Esneyder Jerez Garnica.
Copyright (c) 2025 David Esneyder Jerez Garnica. Released under the GPL v3 license.
FAQs
The best and simplest model based validator for Vue 3, UI independent and no dependency
The npm package djvalidatorvue receives a total of 7 weekly downloads. As such, djvalidatorvue popularity was classified as not popular.
We found that djvalidatorvue demonstrated a healthy version release cadence and project activity because the last version was released less than 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.

Research
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.

Research
Malicious versions of the Telnyx Python SDK on PyPI delivered credential-stealing malware via a multi-stage supply chain attack.

Security News
TeamPCP is partnering with ransomware group Vect to turn open source supply chain attacks on tools like Trivy and LiteLLM into large-scale ransomware operations.