
Security News
Microsoft Releases Open Source Toolkit for AI Agent Runtime Security
Microsoft has released an open source toolkit for enforcing runtime security policies on AI agents as adoption accelerates faster than governance controls.
basic-validation
Advanced tools
This module applies basic validation on JSON data in dot cascade notation.
This module applies basic validation on JSON data in dot cascade notation.
var validation = require('basic-validation');
var againstThis = {
title: validation.string().required(),
author: validation.string().allow(['']),
cost: validation.number().valid([1200, 1300]),
publishers: validation.array().items(validation.object().keys({
name: validation.string()
}))
};
var validateThis = {
title: "Conjuring",
author: "MR X",
cost: 1200
};
validation.validate(validateThis, againstThis, function(err, result) {
console.log("err :-", err);
console.log("result :-", result);
});
/*output will be
err:- null
result:- { title: 'Conjuring', author: 'MR X', cost: 1200 }
*/
var againstThis = {
title: validation.string().required(),
author: validation.string().allow(['']),
cost: validation.number().valid([1200, 1300]),
publishers: validation.array().items(validation.object().keys({
name: validation.string()
}))
};
var validateThis = {
author: "MR X",
cost: 1200
};
validation.validate(validateThis, againstThis, function(err, result) {
console.log("err :-", err);
console.log("result :-", result);
});
/*output will be
err:- title is required
result:- undefined
*/
The module was created to apply validation on old node version where some functionality of 'joi' was not compatible;
FAQs
This module applies basic validation on JSON data in dot cascade notation.
The npm package basic-validation receives a total of 17 weekly downloads. As such, basic-validation popularity was classified as not popular.
We found that basic-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
Microsoft has released an open source toolkit for enforcing runtime security policies on AI agents as adoption accelerates faster than governance controls.

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.