# XV-RO-02

Source: https://xmlvalid.com/rules/XV-RO-02

> CUI vanzator incorect. #The seller's tax code (CUI) fails ANAF's check: at most ten digits, no leading zero, and a valid check digit.

- Level: error
- Rule sets: RO e-Factura tax code checks ANAF validator 1.3.0
- Context: `/ubl:Invoice | /cn:CreditNote`
- Test: `$seller != 'cui'`

## Why it fails

- The seller's CUI has a typo, so its check digit does not match, or it has a leading zero or more than ten digits.
- The VAT number in `cac:PartyTaxScheme/cbc:CompanyID` is fine, but empty or not Romanian, and the validator falls back to `cac:PartyLegalEntity/cbc:CompanyID`, which holds a wrong code.

## How to fix it

- Give the seller's CUI as registered with ANAF, as `RO` followed by the digits or the digits alone. This is our check, written after ANAF's validator, not one of the published rules.

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