Skip to main content

format_validation_errors

Function format_validation_errors 

Source
pub fn format_validation_errors(
    errors: &[ValidationError<'_>],
) -> Vec<(String, String)>
Expand description

Map jsonschema validation errors to field-level error messages.

Each error is mapped to (field_name, message). For root-level errors (e.g., missing required fields), the field name is extracted from the instance path.