bool phoneNumber(
string
$tel)
|
|
Validate danish telephone number
Simple check: 8 digits when removing (, ), -, +, ., ' '
Parameters:
bool ssn(
string
$cpr, [string
$gender = false])
|
|
validates a CPR Number (ssn equiv)
The danish CPR number is a 8 digit number with the birthdate as ddmmyy-xxxy where xxxy is a four digit control number.
The 10 digits are summarized with coefficients 4, 3, 2, 7, 6, 5, 4, 3, 2 and 1. If the sum is divisible by 11 the control is correct.
The last digit of the control number (y) is also dependend on gender, if y is odd it's a male cpr number and if even a female.
Parameters: