Releases: trojs/validator
Releases · trojs/validator
Fix the custom type error validation
Merge pull request #170 from hckrnews/feature/fix-custom-type-validation Fix the custom type error validation
custom type check test
Merge pull request #169 from hckrnews/feature/custom-type-check-test Feature/custom type check test
Optimize questionmark remove from keys
4.2.1 Merge pull request #168 from hckrnews/feature/optimize-questionmark-r…
questionmark can now also on the end on the keys
{
name: String,
age: Number,
birthDay: Date,
'?siblings': Array,
'metaData?': Object,
active: Boolean,
address: addressSchema,
companies: companySchema,
};
Add the function type, so an object can contain also functions
const barSchema = {
name: "string",
address: "string",
drinks: "object",
build: 'function'
const barObj = {
name: 'Jimmys drinks',
address: 'Somewhere over the rainbow',
drinks: {
beer: ['Straffe Hendrik', 'Rochefort', 'St Bernard'],
},
build: () => {}
};
const validator = new Validator(barSchema);
validator.validate(barObj);
Fix the boolean
Also change the version to 4.x because npm audit blame this package has a vulnerability. ( https://www.npmjs.com/advisories/42 )
But its the package validator
and not @hckrnews/validator
So i skipped to 4.x so npm audit dont blame this anymore.
Fix null and undefined values for optional fields
Merge pull request #60 from hckrnews/bug/optional-fields Fix null and undefined values for optional fields
Fix lock file
2.1.6 Fix lock file
Publish package to GitHub
2.1.5 Publish to GitHub
Add url and date validation
Merge pull request #51 from hckrnews/feature/add-url-validation Add url and date validation