scripts/core/augmented.js
function() {
          var myValidator;
          if (myValidator === undefined) {
            myValidator = new Validator();
          }
          /**
          * Returns if the framework supports validation
          * @method supportsValidation
          * @returns {boolean} Returns true if the framework supports validation
          * @memberof Augmented.ValidationFramework
          */
          this.supportsValidation = function() {
            return (myValidator !== null);
          };
          /**
          * Registers a schema to the Framework
          * @method registerSchema
          * @param {string} identity The identity of the schema
          * @param {object} schema The JSON schema
          * @memberof Augmented.ValidationFramework
          */
          this.registerSchema = function(identity, schema) {
            myValidator.addSchema(identity, schema);
          };
          /**
          * Gets a schema
          * @method getSchema
          * @param {string} identity The identity of the schema
          * @returns {object} The JSON schema
          * @memberof Augmented.ValidationFramework
          */
          this.getSchema = function(identity) {
            return myValidator.getSchema(identity);
          };
          /**
          * Gets all schemas
          * @method getSchemas
          * @returns {array} all JSON schemas
          * @memberof Augmented.ValidationFramework
          */
          this.getSchemas = function() {
            return myValidator.getSchemaMap();
          };
          /**
          * Clears all schemas
          * @method clearSchemas
          * @memberof Augmented.ValidationFramework
          */
          this.clearSchemas = function() {
            myValidator.dropSchemas();
          };
          /**
          * Validates data via a schema
          * @method validate
          * @param {object} data The data to validate
          * @param {object} The JSON schema
          * @returns {object} Returns the validation object
          * @memberof Augmented.ValidationFramework
          */
          this.validate = function(data, schema) {
            return myValidator.validateMultiple(data, schema);
          };
          /**
          * Validates data via a schema
          * @method getValidationMessages
          * @returns {array} Returns the validation messages
          * @memberof Augmented.ValidationFramework
          */
          this.getValidationMessages = function() {
            return myValidator.error;
          };

          this.generateSchema = function(model) {
            if (model && model instanceof Augmented.Model) {
              return Augmented.Utility.SchemaGenerator(model.toJSON());
            }

            return Augmented.Utility.SchemaGenerator(model);
          };
        }
function() {
          var myValidator;
          if (myValidator === undefined) {
            myValidator = new Validator();
          }
          /**
          * Returns if the framework supports validation
          * @method supportsValidation
          * @returns {boolean} Returns true if the framework supports validation
          * @memberof Augmented.ValidationFramework
          */
          this.supportsValidation = function() {
            return (myValidator !== null);
          };
          /**
          * Registers a schema to the Framework
          * @method registerSchema
          * @param {string} identity The identity of the schema
          * @param {object} schema The JSON schema
          * @memberof Augmented.ValidationFramework
          */
          this.registerSchema = function(identity, schema) {
            myValidator.addSchema(identity, schema);
          };
          /**
          * Gets a schema
          * @method getSchema
          * @param {string} identity The identity of the schema
          * @returns {object} The JSON schema
          * @memberof Augmented.ValidationFramework
          */
          this.getSchema = function(identity) {
            return myValidator.getSchema(identity);
          };
          /**
          * Gets all schemas
          * @method getSchemas
          * @returns {array} all JSON schemas
          * @memberof Augmented.ValidationFramework
          */
          this.getSchemas = function() {
            return myValidator.getSchemaMap();
          };
          /**
          * Clears all schemas
          * @method clearSchemas
          * @memberof Augmented.ValidationFramework
          */
          this.clearSchemas = function() {
            myValidator.dropSchemas();
          };
          /**
          * Validates data via a schema
          * @method validate
          * @param {object} data The data to validate
          * @param {object} The JSON schema
          * @returns {object} Returns the validation object
          * @memberof Augmented.ValidationFramework
          */
          this.validate = function(data, schema) {
            return myValidator.validateMultiple(data, schema);
          };
          /**
          * Validates data via a schema
          * @method getValidationMessages
          * @returns {array} Returns the validation messages
          * @memberof Augmented.ValidationFramework
          */
          this.getValidationMessages = function() {
            return myValidator.error;
          };

          this.generateSchema = function(model) {
            if (model && model instanceof Augmented.Model) {
              return Augmented.Utility.SchemaGenerator(model.toJSON());
            }

            return Augmented.Utility.SchemaGenerator(model);
          };
        }
function ( ) { var myValidator ; if ( myValidator === undefined ) { myValidator = new Validator ( ) ; } /**
          * Returns if the framework supports validation
          * @method supportsValidation
          * @returns {boolean} Returns true if the framework supports validation
          * @memberof Augmented.ValidationFramework
          */ this . supportsValidation = function ( ) { return ( myValidator !== null ) ; } ; /**
          * Registers a schema to the Framework
          * @method registerSchema
          * @param {string} identity The identity of the schema
          * @param {object} schema The JSON schema
          * @memberof Augmented.ValidationFramework
          */ this . registerSchema = function ( identity , schema ) { myValidator . addSchema ( identity , schema ) ; } ; /**
          * Gets a schema
          * @method getSchema
          * @param {string} identity The identity of the schema
          * @returns {object} The JSON schema
          * @memberof Augmented.ValidationFramework
          */ this . getSchema = function ( identity ) { return myValidator . getSchema ( identity ) ; } ; /**
          * Gets all schemas
          * @method getSchemas
          * @returns {array} all JSON schemas
          * @memberof Augmented.ValidationFramework
          */ this . getSchemas = function ( ) { return myValidator . getSchemaMap ( ) ; } ; /**
          * Clears all schemas
          * @method clearSchemas
          * @memberof Augmented.ValidationFramework
          */ this . clearSchemas = function ( ) { myValidator . dropSchemas ( ) ; } ; /**
          * Validates data via a schema
          * @method validate
          * @param {object} data The data to validate
          * @param {object} The JSON schema
          * @returns {object} Returns the validation object
          * @memberof Augmented.ValidationFramework
          */ this . validate = function ( data , schema ) { return myValidator . validateMultiple ( data , schema ) ; } ; /**
          * Validates data via a schema
          * @method getValidationMessages
          * @returns {array} Returns the validation messages
          * @memberof Augmented.ValidationFramework
          */ this . getValidationMessages = function ( ) { return myValidator . error ; } ; this . generateSchema = function ( model ) { if ( model && model instanceof Augmented . Model ) { return Augmented . Utility . SchemaGenerator ( model . toJSON ( ) ) ; } return Augmented . Utility . SchemaGenerator ( model ) ; } ; }
Augmented.ValidationFramework -
The Validation Framework Base Wrapper Class.
Provides abstraction for base validation build-in library
@constructor Augmented.ValidationFramework
@memberof Augmented
Augmented . ValidationFramework - The Validation Framework Base Wrapper Class . Provides abstraction for base validation build - in library