apidoc
[ class tree: apidoc ] [ index: apidoc ] [ all elements ]

Class: Validate_LV

Source Location: /Validate_LV-1.0.0RC2/Validate/LV.php

Class Overview


Data validation class for Latvia


Methods


Inherited Variables

Inherited Methods


Class Details

[line 43]
Data validation class for Latvia

This class provides methods to validate:

  • VAT number
  • Registration number
  • Swift code
  • Telephone number
  • Person ID
  • IBAN Bank account number for Latvian Banks
  • Postal code
  • Passport
  • Person name



[ Top ]


Method Detail

IBAN   [line 153]

bool IBAN( string $iban, [ $swift = false])

Validate latvian account number
  • Access: public

Parameters:

string   $iban   —  The account number to be validated
   $swift   — 

[ Top ]

passport   [line 200]

bool passport( string $passportNumber)

Validates a Latvian passport number e.g. LF321654741
  • Access: public

Parameters:

string   $passportNumber   — 

[ Top ]

personId   [line 106]

bool personId( string $personId)

Validate latvian person Id (latvian social security number) e.g. 111111-11111 is valid person id for person born in November 11th 1911.

The last digit serves as checkdigit

  • Access: public

Parameters:

string   $personId   —  The person id to be validated

[ Top ]

personName   [line 215]

bool personName( string $name, [integer $length = 50])

Validates a Latvian person name

First letter must be uppercase Can contain latin letters, latvian standart letters, symbols ' ' and '-' e.g. Jānis Kārkliņš

  • Access: public

Parameters:

string   $name   — 
integer   $length   — 

[ Top ]

phoneNumber   [line 86]

bool phoneNumber( string $number)

Validates phone number Latvian phone code is +371 Phone number without country code consists of 7 or 8 digits
  • Access: public

Parameters:

string   $number   —  The phone number to be validated

[ Top ]

postalCode   [line 187]

bool postalCode( string $postcode)

Validate Latvian postcode e.g. LV-1004
  • Access: public

Parameters:

string   $postcode   —  the postcode to be validated

[ Top ]

registrationNumber   [line 62]

bool registrationNumber( string $regNr)

Validates registration number of an organization
  • Access: public

Parameters:

string   $regNr   —  The registration number to be validated

[ Top ]

swift   [line 73]

bool swift( string $swift)

Validates Latvian bank SWIFT code e.g. AIZKLV22
  • Access: public

Parameters:

string   $swift   —  The swift code to be validated

[ Top ]

vatNumber   [line 51]

bool vatNumber( string $vat)

Validates VAT number of an organization
  • Access: public

Parameters:

string   $vat   —  The VAT number to be validated

[ Top ]


Documentation generated on Mon, 11 Mar 2019 15:09:29 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.