3.0.1 • Published 5 years ago
next-core-validation v3.0.1
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
Returns boolean Returns true on success
getSchema
Gets a schema
Parameters
identitystring 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
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
- See: https://github.com/geraintluff/uri-templates but with all the de-substitution stuff removed
SchemaGenerator
Genrate a schema from a set of data
Parameters
dataobject a dataset to produce a schema fromtitle(optional, default"model")description(optional, default"Generated Schema")