ValidationResult constructor

ValidationResult([
  1. String? path,
  2. ValidationResultType? type,
  3. String? code,
  4. String? message,
  5. dynamic expected,
  6. dynamic actual,
])

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

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

See ValidationResultType

Implementation

ValidationResult(
    [String? path,
    ValidationResultType? type,
    String? code,
    String? message,
    dynamic expected,
    dynamic actual]) {
  _path = path;
  _type = type;
  _code = code;
  _message = message;
  _expected = expected;
  _actual = actual;
}