
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
js-object-validation
Advanced tools
This is basically aimed to validate forms in reactjs.
npm i js-object-validation
or
npm install js-object-validation
yarn add js-object-validation
Pure JS
Customizable messages
No dependencies
Easy to use.
import Validator from "js-object-validation";
try{
const objectToValidate = {
email: "sbamniya23",
password: "12"
}
const validations = {
email: {
email: true,
},
password: {
minlength: 8,
}
}
const messages = {
email: {
email: "Email should be valid email",
},
password: {
minlength: "Password should be at least 8 charater long",
}
} // this is optional
const {isValid, errors} = Validator(objectToValidate, validations, messages);
if(isValid){
<!-- object has passed all validations -->
} else {
<!-- object has some error -->
console.log(errors)
}
} catch(error) {
console.log(error)
}
required
numeric
maxnumber
minnumbers
alphanumeric
alpha
maxlength
minlength
equal
password
username
url
Fixed Issue #1
Added Validations for Password and Username
Added typescript defination and removed ENUM for clear management
If you have any new update/idea feel free to contact.
FAQs
Simple object validator written in Pure Javascript
The npm package js-object-validation receives a total of 17 weekly downloads. As such, js-object-validation popularity was classified as not popular.
We found that js-object-validation 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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.