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.
ValidationResult([String? path, ValidationResultType? type, String? code, String? message, dynamic expected, dynamic actual])
- path: String? - dot notation path of the validated element.
- type: ValidationResultType? - type of the validation result: Information, Warning, or Error.
- code: String? - error code.
- message: String? - human readable message.
- expected: dynamic - value expected by a schema validation.
- actual: dynamic - actual value found by a schema validation.
Instance methods
getActual
Gets the actual value found by a schema validation.
dynamic getActual()
- returns: dynamic - actual value.
getCode
Gets the error code.
String getCode()
- returns: String - error code
getExpected
Gets the value expected by a schema validation.
dynamic getExpected()
- returns: dynamic - expected value.
getMessage
Gets the human readable message.
String getMessage()
- returns: String - result message.
getPath
Gets the dot notation path of the validated element.
String getPath()
- returns: String - path of the validated element.
getType
Gets the dot notation path of the validated element.
ValidationResultType getType()
- returns: ValidationResultType - type of the validation result.