/[drupal]/contributions/modules/phone/phone.it.inc
ViewVC logotype

Diff of /contributions/modules/phone/phone.it.inc

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.10, Sun Nov 30 23:48:25 2008 UTC revision 1.11, Mon Dec 1 00:00:19 2008 UTC
# Line 12  function valid_it_phone_number($phonenum Line 12  function valid_it_phone_number($phonenum
12    $regex = "/^(0([1345789][0159]|(37|54|73|96)[1234567]|(12|17|34|38|46|52|57|78|8[678]|9[2378])[12345]|(14|32|47)[1234]|(18|36|53|57|77|82)[345]|(33|72|83|94)[12]|1(31|6[1356]|8[27])|2|3(46|62|86)|4([23][123456789]|4[245]|81)|5([368]6|32|6[45]|[78][78]|8[345])|6|7(4[2346]|6[1356]|7[16]|89)|8(2[78]|3[356])|968|976)\/[1-9]|3([234][03789]|3[456]|46|6[0368]|8[0389]|9[0123])\/)[0-9 -]+[0-9]$/i";    $regex = "/^(0([1345789][0159]|(37|54|73|96)[1234567]|(12|17|34|38|46|52|57|78|8[678]|9[2378])[12345]|(14|32|47)[1234]|(18|36|53|57|77|82)[345]|(33|72|83|94)[12]|1(31|6[1356]|8[27])|2|3(46|62|86)|4([23][123456789]|4[245]|81)|5([368]6|32|6[45]|[78][78]|8[345])|6|7(4[2346]|6[1356]|7[16]|89)|8(2[78]|3[356])|968|976)\/[1-9]|3([234][03789]|3[456]|46|6[0368]|8[0389]|9[0123])\/)[0-9 -]+[0-9]$/i";
13    
14    // return true if valid, false otherwise    // return true if valid, false otherwise
15    return (bool) preg_match($regex, $phonenumber);    return (bool) preg_match($regex, $phonenumber);
16  }  }
17    
18  /**  /**

Legend:
Removed from v.1.10  
changed lines
  Added in v.1.11

  ViewVC Help
Powered by ViewVC 1.1.2