Validation Errors
Understanding and parsing validation errors in mapping results
When processing data through a schema transformer, validation errors are captured in the output’s errors
property, providing detailed information about any data quality issues or schema violations.
Error Structure
The validation errors are organized in a tree structure where each path represents a field or nested object in your data. Each leaf node contains an array of ValidationErrorDetail
objects:
Error Types
The system recognizes several categories of validation errors:
-
Basic Validation
pattern
: Value doesn’t match the required patternrequired
: Required field is missingtype
: Value doesn’t match the expected typeenum
: Value isn’t one of the allowed optionsarray
: Array validation failuresduplicate
: Duplicate value where uniqueness is required
-
Custom Validation
custom
: Custom validation rule failuresunknown
: Unrecognized validation issues
-
Unsupported Cases
- Various
unsupported_*
types for special handling
- Various
Error Statistics
Each error includes detailed statistics about its occurrence:
Error Samples
Errors include sample data to help diagnose issues:
Example
Here’s an example of how validation errors might appear in the output:
In this example, we can see validation errors for email format and age type conversion, including statistics about how often these errors occur and sample problematic values.