SproutCMS

This is the code documentation for the SproutCMS project

function phone()

Checks if a phone number is valid.

Usage

void Validity::phone ( string $val [, int $min_digits ] );

Example

$valid->check('mobile', 'Validity::phone', 10)

Arguments

  1. string $val
    Phone number
  2. int $min_digits = 8
    Minimum number of digits required in phone number.
           This can be less than 8 for fields which allow short numbers like 000 or 13 11 66

Exceptions thrown

Return value

  • void