ValidationHelper
in package
Validate data
Table of Contents
Methods
- ValidateBik() : bool
- Validates a Bank Identifier Code (BIK).
- ValidateInn() : bool
- Validates an Individual Taxpayer Identification Number (INN).
- ValidateKpp() : bool
- Validates a KPP (Tax Registration Reason Code) in Russia.
- ValidateKs() : bool
- Validates a Control Account Number (KS) using the specified Bank Identifier Code (BIK).
- ValidateOgrn() : bool
- Validates an OGRN (Primary State Registration Number) in Russia.
- ValidateOgrnip() : bool
- Validates an Individual Entrepreneur State Registration Number (OGRNIP) in Russia.
- ValidateRs() : bool
- Validates a Bank Account Number (RS) using the specified Bank Identifier Code (BIK).
- ValidateSnils() : bool
- Validates a Social Security Number (SNILS) in Russia.
Methods
ValidateBik()
Validates a Bank Identifier Code (BIK).
public
static ValidateBik(string $bik[, mixed &$error_message = null ][, mixed &$error_code = null ]) : bool
Parameters
- $bik : string
-
The BIK to validate.
- $error_message : mixed = null
-
(Optional) A reference to store an error message if validation fails.
- $error_code : mixed = null
-
(Optional) A reference to store an error code if validation fails.
Return values
bool —True if the BIK is valid, false otherwise.
ValidateInn()
Validates an Individual Taxpayer Identification Number (INN).
public
static ValidateInn(string $inn[, mixed &$error_message = null ][, mixed &$error_code = null ]) : bool
Parameters
- $inn : string
-
The INN to validate.
- $error_message : mixed = null
-
(Optional) A reference to store an error message if validation fails.
- $error_code : mixed = null
-
(Optional) A reference to store an error code if validation fails.
Return values
bool —True if the INN is valid, false otherwise.
ValidateKpp()
Validates a KPP (Tax Registration Reason Code) in Russia.
public
static ValidateKpp(string $kpp[, mixed &$error_message = null ][, mixed &$error_code = null ]) : bool
Parameters
- $kpp : string
-
The KPP to validate.
- $error_message : mixed = null
-
(Optional) A reference to store an error message if validation fails.
- $error_code : mixed = null
-
(Optional) A reference to store an error code if validation fails.
Return values
bool —True if the KPP is valid, false otherwise.
ValidateKs()
Validates a Control Account Number (KS) using the specified Bank Identifier Code (BIK).
public
static ValidateKs(string $ks, string $bik[, mixed &$error_message = null ][, mixed &$error_code = null ]) : bool
Parameters
- $ks : string
-
The Control Account Number (KS) to validate.
- $bik : string
-
The Bank Identifier Code (BIK) associated with the bank.
- $error_message : mixed = null
-
(Optional) A reference to store an error message if validation fails.
- $error_code : mixed = null
-
(Optional) A reference to store an error code if validation fails.
Return values
bool —True if the KS is valid for the given BIK, false otherwise.
ValidateOgrn()
Validates an OGRN (Primary State Registration Number) in Russia.
public
static ValidateOgrn(string $ogrn[, mixed &$error_message = null ][, mixed &$error_code = null ]) : bool
Parameters
- $ogrn : string
-
The OGRN to validate.
- $error_message : mixed = null
-
(Optional) A reference to store an error message if validation fails.
- $error_code : mixed = null
-
(Optional) A reference to store an error code if validation fails.
Return values
bool —True if the OGRN is valid, false otherwise.
ValidateOgrnip()
Validates an Individual Entrepreneur State Registration Number (OGRNIP) in Russia.
public
static ValidateOgrnip(string $ogrnip[, mixed &$error_message = null ][, mixed &$error_code = null ]) : bool
Parameters
- $ogrnip : string
-
The OGRNIP to validate.
- $error_message : mixed = null
-
(Optional) A reference to store an error message if validation fails.
- $error_code : mixed = null
-
(Optional) A reference to store an error code if validation fails.
Return values
bool —True if the OGRNIP is valid, false otherwise.
ValidateRs()
Validates a Bank Account Number (RS) using the specified Bank Identifier Code (BIK).
public
static ValidateRs(string $rs, string $bik[, mixed &$error_message = null ][, mixed &$error_code = null ]) : bool
Parameters
- $rs : string
-
The Bank Account Number (RS) to validate.
- $bik : string
-
The Bank Identifier Code (BIK) associated with the bank.
- $error_message : mixed = null
-
(Optional) A reference to store an error message if validation fails.
- $error_code : mixed = null
-
(Optional) A reference to store an error code if validation fails.
Return values
bool —True if the RS is valid for the given BIK, false otherwise.
ValidateSnils()
Validates a Social Security Number (SNILS) in Russia.
public
static ValidateSnils(string $snils[, mixed &$error_message = null ][, mixed &$error_code = null ]) : bool
Parameters
- $snils : string
-
The SNILS to validate.
- $error_message : mixed = null
-
(Optional) A reference to store an error message if validation fails.
- $error_code : mixed = null
-
(Optional) A reference to store an error code if validation fails.
Return values
bool —True if the SNILS is valid, false otherwise.