Validate records against schema
validate_recordsValidate flat records against a camt.05x message type's input JSON Schema to detect structural and type errors per row before XML generation.
Instructions
Validate flat records against a message type's input JSON Schema.
Use this on in-memory reversing-entry records to catch structural/type
errors per row before generation. To validate a whole camt.05x *document*
(XML) against its XSD instead, use ``validate_statement``.
Returns a report ``{"valid": bool, "total": int, "valid_count": int,
"errors": [...]}``.
Args:
message_type: A supported ISO 20022 camt.05x message type.
records: One or more flat reversing-entry records to validate.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| records | Yes | One or more flat reversing-entry records (each a dict of field name to value) to validate row-by-row against the message type's input JSON Schema. | |
| message_type | Yes | A supported ISO 20022 camt.05x message type string, e.g. 'camt.053.001.14', whose input JSON Schema the records are checked against. Call list_message_types to discover accepted values and get_input_schema to see the constraints. |