Validate records against schema
validate_recordsValidate flat payment records against ISO 20022 message type schemas. Returns row-by-row structural error reports to catch issues before message generation.
Instructions
Validate flat records against a message type's input JSON Schema.
Use this before ``generate_message`` to catch structural/type errors
per record and get a row-by-row error report. This checks JSON-Schema
shape only; for payment-scheme rulebook checks (SEPA field lengths,
charset, etc.) also run ``validate_payment_scheme``.
Returns a report ``{"valid": bool, "total": int, "valid_count": int,
"errors": [...]}``.
Args:
message_type: A supported ISO 20022 pain message type.
records: One or more flat payment records to validate.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| records | Yes | One or more flat payment records to validate, each a dict of field name → value (see get_input_schema for the fields and get_required_fields for the mandatory ones). | |
| message_type | Yes | A supported ISO 20022 pain message type. Must be exactly one of: 'pain.001.001.03', 'pain.001.001.04', 'pain.001.001.05', 'pain.001.001.06', 'pain.001.001.07', 'pain.001.001.08', 'pain.001.001.09', 'pain.001.001.10', 'pain.001.001.11', 'pain.001.001.12', 'pain.008.001.02' (see list_message_types). |