validateOrThrow method

void validateOrThrow(
  1. String key,
  2. Object value
)

Implementation

void validateOrThrow(String key, Object value) {
  final result = validate([key], value);
  if (!result.isValid) {
    throw SchemaValidationException(result);
  }
}