Warning: Use of undefined constant Symbol - assumed 'Symbol' (this will throw an Error in a future version of PHP) in /mnt/new-ebs/workbench-106550/lib/dojo/util/docscripts/lib/parser2/dojo2.inc on line 215 Warning: Use of undefined constant JavaScriptSymbol - assumed 'JavaScriptSymbol' (this will throw an Error in a future version of PHP) in /mnt/new-ebs/workbench-106550/lib/dojo/util/docscripts/lib/parser2/dojo2.inc on line 215

dojox/json/schema.js

  • Provides:

    • dojox.json.schema
  • dojox.json.schema.validate

    • parameters:
      • instance: (typeof Any)
        The instance value/object to validate
      • schema: (typeof Object)
        The schema to use to validate
    • summary
      To use the validator call this with an instance object and an optional schema object.
      If a schema is provided, it will be used to validate. If the instance object refers to a schema (self-validating),
      that schema will be used to validate and the schema parameter is not necessary (if both exist,
      both validations will occur).
    • description
      The validate method will return an object with two properties:
      valid: A boolean indicating if the instance is valid by the schema
      errors: An array of validation errors. If there are no errors, then an
      empty list will be returned. A validation error will have two properties:
      property: which indicates which property had the error
      message: which indicates what the error was
    • type
      Function
  • dojox.json.schema.checkPropertyChange

    • parameters:
      • value: (typeof Any)
        The new instance value/object to check
      • schema: (typeof Object)
        The schema to use to validate
        return:
        see dojox.validate.jsonSchema.validate
      • property: (typeof String)
    • summary
      The checkPropertyChange method will check to see if an value can legally be in property with the given schema
      This is slightly different than the validate method in that it will fail if the schema is readonly and it will
      not check for self-validation, it is assumed that the passed in value is already internally valid.
      The checkPropertyChange method will return the same object type as validate, see JSONSchema.validate for
      information.
    • type
      Function
  • dojox.json.schema.mustBeValid

    • parameters:
      • result: (typeof the)
        result returned from checkPropertyChange or validate
    • summary
      This checks to ensure that the result is valid and will throw an appropriate error message if it is not
    • type
      Function
  • dojox.json.schema._validate

    • parameters:
      • instance: (typeof Any)
      • schema: (typeof Object)
      • _changing: (typeof Boolean)
    • type
      Function
  • dojox.json.schema

    • type
      Object
  • dojox.json

    • type
      Object
  • dojox

    • type
      Object