ValidationResult

Result generated by a schema validation

Description

The ValidationResult class provides a representation of the result generated by a schema validation.

Constructors

Creates a new instance of a validation ressult and sets its values. See ValidationResultType

public ValidationResult(string path, ValidationResultType type, string code, string message, object expected, object actual)

  • path: string - a dot notation path of the validated element.
  • type: ValidationResultType = null - a type of the validation result: Information, Warning, or Error.
  • code: string - an error code.
  • message: string - a human readable message.
  • expected: object - an value expected by schema validation.
  • actual: object - an actual value found by schema validation.

Creates a new instance of validation result.

public ValidationResult()

Properties

Path

Gets and sets dot notation path of the validated element.

public string Path [ get, set ]

Type

Gets and sets dot notation path of the validated element.

public ValidationResultType Type [ get, set ]

Code

Gets and sets the error code.

publicstring Code [ get, set ]

Message

Gets and sets the human readable message.

publicstring Message [ get, set ]

Expected

Gets and sets the value expected by schema validation.

publicobject Expected [ get, set ]

Actual

Gets and sets the actual value found by schema validation.

publicobject Actual [ get, set ]