Documentation / @facturometro/validator / identifiers / checkPIVAseIT
Function: checkPIVAseIT() ​
checkPIVAseIT(
value):boolean
Defined in: packages/validator/src/identifiers/it-cf-piva.ts:98
u:checkPIVAseIT: when the value starts with IT (or it) it must be followed by eleven digits with a valid check digit; any other prefix passes, the check only applies to Italian numbers. A mixed-case It is not recognised as Italian, exactly as upstream.
Parameters ​
value ​
string
The identifier, whitespace-normalized.
Returns ​
boolean
true when the value is not Italian or is a valid partita IVA.
Example ​
ts
import { checkPIVAseIT } from '@facturometro/validator';
checkPIVAseIT('IT01234567897'); // true
checkPIVAseIT('IT01234567890'); // false
checkPIVAseIT('FR12345678901'); // true