validate_rfc_mx
Check if a Mexican RFC follows the official SAT format. Returns valid/invalid, type (individual or company) for tax compliance workflows.
Instructions
Validates a Mexican RFC (Registro Federal de Contribuyentes) — the tax identification number issued by the SAT (Servicio de Administración Tributaria). Validates format for both individuals (13 characters: 4 letters + 6 digit date + 3 alphanumeric homoclave) and companies (12 characters: 3 letters + 6 digit date + 3 alphanumeric homoclave). Returns { valid: boolean, type: 'individual'|'company', rfc: string } or { valid: false, reason: string }. Use when processing Mexican CFDI invoices, supplier registration, or any Mexican tax compliance workflow.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| rfc | Yes | Mexican RFC with or without spaces. Example: 'ABCD850101ABC' (individual) or 'ABC850101AB1' (company) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| valid | Yes | ||
| type | No | ||
| rfc | No | ||
| reason | No |