正在显示
1 个修改的文件
包含
7 行增加
和
0 行删除
| @@ -40,6 +40,13 @@ class WebSettingReceivingLogic extends BaseLogic | @@ -40,6 +40,13 @@ class WebSettingReceivingLogic extends BaseLogic | ||
| 40 | try { | 40 | try { |
| 41 | $this->model->del(['project_id'=>$this->user['project_id']]); | 41 | $this->model->del(['project_id'=>$this->user['project_id']]); |
| 42 | foreach ($this->param['data'] as $v){ | 42 | foreach ($this->param['data'] as $v){ |
| 43 | + if($v['type'] == 1){ | ||
| 44 | + // 使用正则表达式匹配中国大陆手机号 | ||
| 45 | + $pattern = '/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/'; | ||
| 46 | + if (!preg_match($pattern, $v['values'])) { | ||
| 47 | + continue; | ||
| 48 | + } | ||
| 49 | + } | ||
| 43 | if($v['type'] == 2){ | 50 | if($v['type'] == 2){ |
| 44 | // 使用正则表达式匹配中国大陆手机号 | 51 | // 使用正则表达式匹配中国大陆手机号 |
| 45 | $pattern = '/^1[3456789]\d{9}$/'; | 52 | $pattern = '/^1[3456789]\d{9}$/'; |
-
请 注册 或 登录 后发表评论