JSON schema validator, which is designed to be fast and simple to use - another part of my study project
npm install @playerony/validatorjavascript
const data = {
name: "test@gmail.com",
objects: ["13.12.1995", "13.12.1995"]
};
const schema = {
parameters: {
name: {
type: "string",
format: "email"
},
objects: {
type: "array",
items: {
type: "string",
format: "date"
}
}
},
required: ["name", "objects"]
};
validate(data, schema);
``