3.0.1 • Published 3 years ago

next-core-validation v3.0.1

Weekly downloads
6
License
Apache-2.0
Repository
github
Last release
3 years ago

next-core-validation

Augmented.js Next Core - Validation Framework

API

Table of Contents

ValidationFramework

Augmented.ValidationFramework - The Validation Framework Base Wrapper Class. Provides abstraction for base validation build-in library

supportsValidation

Returns if the framework supports validation

Returns boolean Returns true if the framework supports validation

registerSchema

Registers a schema to the Framework

Parameters

  • identity string The identity of the schema
  • schema object The JSON schema

Returns boolean Returns true on success

getSchema

Gets a schema

Parameters

  • identity string The identity of the schema

Returns object The JSON schema

getSchemas

Gets all schemas

Returns array all JSON schemas

clearSchemas

Clears all schemas

validate

Validates data via a schema

Parameters

  • data object The data to validate
  • schema object The JSON schema

Returns object Returns the validation object

getValidationMessages

Validates data via a schema

Returns array Returns the validation messages

generateSchema

Validates data via a schema

Parameters

  • model (Augmented.Model | object) The model generate from

Returns object Returns the schema

URI_TEMPLATE_GLOBAL_MODIFIERS

SchemaGenerator

Genrate a schema from a set of data

Parameters

  • data object a dataset to produce a schema from
  • title (optional, default "model")
  • description (optional, default "Generated Schema")