FacturaScripts

FiscalNumberValidator
in package

Verify numbers of fiscal identity

Tags
author

Cristo M. Estévez Hernández [email protected]

author

Carlos García Gómez [email protected]

Table of Contents

validate()  : bool
Check the number depend on type and return true if the number if valid.
isValidCIF()  : bool
isValidDNI()  : bool
isValidRFC()  : bool
isValidRNC()  : bool
Validate RNC Rep. Dominicana Accept two format : only number: "000000000" or official format: "000-00000-0"
sumDigits()  : int

Methods

validate()

Check the number depend on type and return true if the number if valid.

public static validate(string|null $type, string|null $number) : bool
Parameters
$type : string|null
$number : string|null
Return values
bool

isValidCIF()

protected static isValidCIF(string|null $cif) : bool
Parameters
$cif : string|null
Return values
bool

isValidDNI()

protected static isValidDNI(string|null $dni) : bool
Parameters
$dni : string|null
Return values
bool

isValidRFC()

protected static isValidRFC(string|null $number) : bool
Parameters
$number : string|null
Return values
bool

isValidRNC()

Validate RNC Rep. Dominicana Accept two format : only number: "000000000" or official format: "000-00000-0"

protected static isValidRNC(string|null $number) : bool
Parameters
$number : string|null
Return values
bool

sumDigits()

private static sumDigits(int $num) : int
Parameters
$num : int
Return values
int

Search results