Exciting release!Introducing "safe npm". Learn more
Socket
Log inDemoInstall

@springworks/schema-validator

Package Overview
Dependencies
2
Maintainers
2
Versions
122
Issues
File Explorer

Advanced tools

@springworks/schema-validator

Wraps json-schema validator and sets default custom formats.

    3005.192.0latest
    GitHub

Version published
Maintainers
2
Weekly downloads
913
decreased by-33.21%

Weekly downloads

Readme

Source

@springworks/schema-validator

Wraps json-schema validator and sets default custom formats.

yarn add @springworks/schema-validator

Usage

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

Last updated on 16 Feb 2023

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.

Install Socket
Socket
support@socket.devSocket SOC 2 Logo

Product

  • Package Issues
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc