|
|

楼主 |
发表于 2010-9-20 10:58:44
|
显示全部楼层
再记一下,包括分机号以及连排号。比如:86-0371-65350000-021和0371-65353999/888。
if(!preg_match("/(^\d{7,8}([\/]\d{1,8})*([-]\d{1,5})*$)|(^0\d{2}[-]?\d{8}([\/]\d{1,8})*([-]\d{1,5})*$)|(^0\d{3}[-]?\d{7,8}([\/]\d{1,8})*([-]\d{1,5})*$)|(^([+]|[0])?86[-][0]?\d{3}[-]\d{7,8}([-]\d{1,5})*$)|(^[0]?(13|15|18)\d{9}$)/",trim(str_replace(' ','',$member['telephone'])))) return $this->_('请正确书写公司电话:区号-电话号码'); |
|