Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Validator

Hierarchy

  • Validator

Index

Constructors

constructor

  • Parameters

    • parser: ParseConformance

      Parser the validator should use

    • options: ValidatorOptions

      Options the validator should use

    • Optional resourceId: string

      The id of the obj/resource being validated

    • Optional isXml: boolean

      Indicates if the object was originally sent in XML format. Influences how the "location" field is displayed.

    • Optional obj: any

      The object/resource that will be validated. This is only intended for use internally. It allows the contained resources to be passed along in the onBefore events

    Returns Validator

Properties

Private isXml

isXml: boolean = false

Private obj

obj: any

Readonly options

Readonly parser

Private Optional resourceId

resourceId: string

response

response: ValidatorResponse = ...

Methods

Private addError

  • addError(location: string, message: string): void
  • Parameters

    • location: string
    • message: string

    Returns void

Private addFatal

  • addFatal(location: string, message: string): void
  • Parameters

    • location: string
    • message: string

    Returns void

Private addInfo

  • addInfo(location: string, message: string): void
  • Parameters

    • location: string
    • message: string

    Returns void

Private addWarn

  • addWarn(location: string, message: string): void
  • Parameters

    • location: string
    • message: string

    Returns void

Private checkCode

  • checkCode(treeDisplay: string, parsedValueSet: ParsedValueSet, valueSetUrl: string, code: any, system?: any): boolean
  • Parameters

    • treeDisplay: string
    • parsedValueSet: ParsedValueSet
    • valueSetUrl: string
    • code: any
    • Optional system: any

    Returns boolean

validate

  • Validates the specified input (xml as a string, json also as a string, or a resource represented as a javascript object)

    Parameters

    • input: any

      The input resource to validate

    Returns ValidatorResponse

Private validateNext

validateProperties

  • validateProperties(obj: any, properties: any, tree: any): void
  • Parameters

    • obj: any
    • properties: any
    • tree: any

    Returns void

Static getTreeDisplay

  • getTreeDisplay(tree: any, isXml?: any, leaf?: any): string
  • Parameters

    • tree: any
    • Optional isXml: any
    • Optional leaf: any

    Returns string

Generated using TypeDoc