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 result and sets its values. See ValidationResultType.

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

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

Creates a new instance of ValidationResult.

public ValidationResult()

Properties

Path

Gets and sets a dot notation path of the validated element.

public string Path { get; set; }

Type

Gets the type of the validation result.

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 a schema validation.

publicobject Expected { get; set; }

Actual

Gets and sets the actual value found by a schema validation.

publicobject Actual { get; set; }