validate_partita_iva_format
Validate an Italian VAT number (Partita IVA) by checking its 11-digit format and modulo-10 checksum. Returns valid or detailed error.
Instructions
Validate an Italian Partita IVA for format (11 digits) and modulo-10 checksum.
Use this as step 1 in the invoice generation workflow before any other tool. Equivalent to validate_partita_iva() in header tools — use this standalone version when you only need the validation result without importing header tools.
Strips whitespace, checks for exactly 11 digits, then applies the official Agenzia delle Entrate control algorithm to verify the check digit.
On success returns {'valid': true, 'value': ''}. On failure returns {'valid': false, 'value': '', 'error': ''}.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| partita_iva | Yes | Italian Partita IVA (VAT number) to validate. Must be exactly 11 digits. Whitespace is stripped before validation. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||