# VF-1230

Source: https://xmlvalid.com/rules/VF-1230

> Si el valor de GeneradoPor es igual a D y el CodigoPais tiene valor ES (España), el valor del campo IDType del bloque Generador debe ser Pasaporte (03) o No Censado (07).

- Level: error
- Rule sets: VERI*FACTU checks of the AEAT Validaciones 1.2.2 (8 April 2026)
- Context: `/*:RegFactuSistemaFacturacion/*:RegistroFactura/*:RegistroAnulacion`
- Test: `not(normalize-space(*:GeneradoPor) = 'D' and normalize-space(*:Generador/*:IDOtro/*:CodigoPais) = 'ES') or normalize-space(*:Generador/*:IDOtro/*:IDType) = ('03', '07')`

In English: When the recipient generated the cancellation (GeneradoPor D) and CodigoPais is ES, Generador's IDType must be passport (03) or not registered (07).

Validate a document against these rules: https://xmlvalid.com/validate
