芝麻web文件管理V1.00
编辑当前文件:/home/asmplong/www/ancien-site-2019/site/libraries/joomla/form/rules/tel.php
'/^(?:\+?1[-. ]?)?\(?([2-9][0-8][0-9])\)?[-. ]?([2-9][0-9]{2})[-. ]?([0-9]{4})$/', 'ITU-T'=> '/^\+(?:[0-9] ?){6,14}[0-9]$/', 'EPP' => '/^\+[0-9]{1,3}\.[0-9]{4,14}(?:x.+)?$/' ); if (isset($element['plan'])){ $plan = (string) $element['plan']; if ($plan =='northamerica' || $plan == 'us' ) { $plan = 'NANP'; } else if ( $plan == 'International' || $plan == 'int' || $plan == 'missdn' || !$plan) { $plan = 'ITU-T'; } else if ( $plan == 'IETF') { $plan='EPP'; } $regex = $regexarray[$plan]; // Test the value against the regular expression. if (preg_match($regex, $value) == false) { return false; } } else { //If the rule is set but no plan is selected just check that there are between //7 and 15 digits inclusive and no illegal characters (but common number separators //are allowed). $cleanvalue = preg_replace('/[+. -(\)]/', '', $value); $regex = '/^[0-9]{7,15}?$/'; if (preg_match($regex, $cleanvalue) == true) { return true; } else { return false; } } return true; } }