New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

exframe-document-validator

Package Overview
Dependencies
Maintainers
2
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

exframe-document-validator

A wrapper around exframe-request-validator to validate quote and policy documents with flexible, CSP based coverage details.

  • 1.2.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
2
Created
Source

exframe-document-validator

A wrapper around exframe-request-validator to validate quote and policy documents with flexible, CSP based coverage details.

Usage

const validate = require('exframe-document-validator');
try {
  validate(context, configuration, document);
  // Document is valid
} catch (e) {
  // For the case where coverageLimits.dwelling is required, but missing:
  console.log(e.validationErrors[0].dataPath);
  // ./coverageLimits
  console.log(e.validationErrors[0].params);
  // { missingProperty: 'dwelling' }
  // For validation schema used to validate document
  console.log(e.validationSchema);
}

Arguments:

  • context object The context object. If the context object contains a log, debug information will be logged there. If not, debug information will not be logged.
  • configuration object Contains coverage details and form fields
    • coverageDetails object A coverageDetails object containing coverageLimits, coverageOptions and deductibles
    • formFields array A collection of formFields objects
  • document object The document to be validated

FAQs

Package last updated on 31 Aug 2022

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc