@springworks/schema-validator
Advanced tools
Weekly downloads
Readme
@springworks/schema-validator
Wraps json-schema validator and sets default custom formats.
yarn add @springworks/schema-validator
import { createValidator, ValidationError } from '@springworks/schema-validator';
const validate = createValidator({
title: 'Test schema',
type: 'object',
properties: {
firstName: {
type: 'string',
},
lastName: {
type: 'string',
},
},
required: ['firstName', 'lastName'],
});
validate(obj);
Throws ValidationError
which will contain a descriptive message property about what actually failed validation.
FAQs
Wraps json-schema validator and sets default custom formats.
The npm package @springworks/schema-validator receives a total of 628 weekly downloads. As such, @springworks/schema-validator popularity was classified as not popular.
We found that @springworks/schema-validator demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket installs a Github app to automatically flag issues on every pull request and report the health of your dependencies. Find out what is inside your node modules and prevent malicious activity before you update the dependencies.