validateAndReturnException method
ValidationException?
validateAndReturnException(])
inherited
Validates the given value and returns a ValidationException
if errors were found.
correlationId
(optional) transaction id to trace execution through call chain.value
a value to be validated.strict
true to treat warnings as errors.
Implementation
ValidationException? validateAndReturnException(
String? correlationId, dynamic value,
[bool strict = false]) {
var results = validate(value);
return ValidationException.fromResults(correlationId, results, strict);
}