new ValidationFramework()

Description

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

Methods


supportsValidation()

Description

Returns if the framework supports validation

Returns

Returns true if the framework supports validation


registerSchema( identity, schema )

Description

Registers a schema to the Framework

Parameters
Name Type Description
identity string

The identity of the schema

schema object

The JSON schema

Returns

Returns true on success


getSchema( identity )

Description

Gets a schema

Parameters
Name Type Description
identity string

The identity of the schema

Returns

The JSON schema


getSchemas()

Description

Gets all schemas

Returns

all JSON schemas


clearSchemas()

Description

Clears all schemas


validate( data, schema )

Description

Validates data via a schema

Parameters
Name Type Description
data object

The data to validate

schema object

The JSON schema

Returns

Returns the validation object


getValidationMessages()

Description

Validates data via a schema

Returns

Returns the validation messages


generateSchema( model )

Description

Validates data via a schema

Parameters
Name Type Description
model Augmented.Model | object

The model generate from

Returns

Returns the schema