diff --git a/Application/Home/Controller/PromoteController.class.php b/Application/Home/Controller/PromoteController.class.php index 890c04244..037cb7b5f 100644 --- a/Application/Home/Controller/PromoteController.class.php +++ b/Application/Home/Controller/PromoteController.class.php @@ -860,6 +860,15 @@ class PromoteController extends BaseController $this->ajaxReturn(array('status' => -1, 'msg' => '身份证格式错误')); } } + if (mb_strlen($_POST['account']) < 6 || mb_strlen($_POST['account']) > 15) { + $this->error('账号长度为6-15个字符', U('Promote/edit_chlid', array('id' => $id, 'type' => I('type', 0)))); + return false; + } + + if (mb_strlen($_POST['real_name']) < 2 || mb_strlen($_POST['real_name']) > 4) { + $this->error('姓名长度为2-4个字符', U('Promote/edit_chlid', array('id' => $id, 'type' => I('type', 0)))); + return false; + } $res = $user->promote_add($_POST); if (is_numeric($res)) { diff --git a/Application/Home/View/default/Promote/add_chlid.html b/Application/Home/View/default/Promote/add_chlid.html index e87d01b21..5d9d63c2a 100644 --- a/Application/Home/View/default/Promote/add_chlid.html +++ b/Application/Home/View/default/Promote/add_chlid.html @@ -37,13 +37,13 @@