Documentation / @facturometro/validator / identifiers / checkCF
Function: checkCF() ​
checkCF(
value):boolean
Defined in: packages/validator/src/identifiers/it-cf-piva.ts:51
u:checkCF: an Italian codice fiscale is either sixteen characters in the personal shape (see the u:checkCF16 port) or eleven characters castable to an integer. Lengths and positions count code points, as XPath's string-length() and substring() do.
Parameters ​
value ​
string
The identifier, whitespace-normalized.
Returns ​
boolean
true when the value has one of the two shapes.
Example ​
ts
import { checkCF } from '@facturometro/validator';
checkCF('RSSMRA85M01H501Z'); // true
checkCF('01234567890'); // true
checkCF('RSSMRA85M01H501'); // false