schema-utils

  • Version 3.1.1
  • Published
  • 66.2 kB
  • 3 dependencies
  • MIT license

Install

npm i schema-utils
yarn add schema-utils
pnpm add schema-utils

Overview

webpack Validation Utils

Index

Functions

function validate

validate: (
schema: Schema,
options: Array<object> | object,
configuration?: ValidationErrorConfiguration | undefined
) => void;
  • Parameter schema

    Parameter options

    Parameter configuration

    Returns

    {void}

Classes

class ValidationError

class ValidationError extends Error {}

    constructor

    constructor(
    errors: any[],
    schema: any,
    configuration?: ValidationErrorConfiguration
    );
    • Parameter errors

      Parameter schema

      Parameter configuration

    property baseDataPath

    baseDataPath: string;
    • {string}

    property errors

    errors: any[];
    • {Array}

    property headerName

    headerName: string;
    • {string}

    property postFormatter

    postFormatter: PostFormatter;
    • {PostFormatter | null}

    property schema

    schema: any;
    • {Schema}

    method formatSchema

    formatSchema: (
    schema: Schema,
    logic?: boolean,
    prevSchemas?: Array<Object>
    ) => string;
    • Parameter schema

      Parameter logic

      Parameter prevSchemas

      Returns

      {string}

    method formatValidationError

    formatValidationError: (error: SchemaUtilErrorObject) => string;
    • Parameter error

      Returns

      {string}

    method formatValidationErrors

    formatValidationErrors: (errors: Array<SchemaUtilErrorObject>) => string;
    • Parameter errors

      Returns

      {string}

    method getSchemaPart

    getSchemaPart: (path: string) => Schema;
    • Parameter path

      Returns

      {Schema}

    method getSchemaPartDescription

    getSchemaPartDescription: (schemaPart?: Schema | undefined) => string;
    • Parameter schemaPart

      Returns

      {string}

    method getSchemaPartText

    getSchemaPartText: (
    schemaPart?: Schema | undefined,
    additionalPath?: (boolean | Array<string>) | undefined,
    needDot?: boolean | undefined,
    logic?: boolean | undefined
    ) => string;
    • Parameter schemaPart

      Parameter additionalPath

      Parameter needDot

      Parameter logic

      Returns

      {string}

    Package Files (3)

    Dependencies (3)

    Dev Dependencies (21)

    Peer Dependencies (0)

    No peer dependencies.

    Badge

    To add a badge like this onejsDocs.io badgeto your package's README, use the codes available below.

    You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/schema-utils.

    • Markdown
      [![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/schema-utils)
    • HTML
      <a href="https://www.jsdocs.io/package/schema-utils"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>