diff --git a/Application/Admin/Controller/PromoteCompanyController.class.php b/Application/Admin/Controller/PromoteCompanyController.class.php index 5524c3c17..95d5c6488 100644 --- a/Application/Admin/Controller/PromoteCompanyController.class.php +++ b/Application/Admin/Controller/PromoteCompanyController.class.php @@ -1156,6 +1156,12 @@ class PromoteCompanyController extends ThinkController if ($save['site_domain_prefix'] == '') { $this->error('请输入推广后台域名前缀'); } + if (strlen($save['site_domain_prefix']) > 6) { + $this->error('域名前缀不能超过6个字符'); + } + if (!preg_match('/^[a-z0-9]+$/', $save['site_domain_prefix'])) { + $this->error('域名前缀只能由小写字母和数字组成'); + } if ($save['site_config']['icon'] == '') { $this->error('请上传推广后台ICON'); } diff --git a/Application/Admin/View/PromoteCompany/add.html b/Application/Admin/View/PromoteCompany/add.html index 02c90526a..670ef62f9 100644 --- a/Application/Admin/View/PromoteCompany/add.html +++ b/Application/Admin/View/PromoteCompany/add.html @@ -378,7 +378,7 @@ *推广后台域名前缀: - 请确保唯一。完整地址: + 请确保唯一,只能由小写字母和数字组成,不能超过6个字符。完整地址: diff --git a/Application/Admin/View/PromoteCompany/edit.html b/Application/Admin/View/PromoteCompany/edit.html index 14b45c62c..aa92e9a7f 100644 --- a/Application/Admin/View/PromoteCompany/edit.html +++ b/Application/Admin/View/PromoteCompany/edit.html @@ -387,7 +387,7 @@ } ?> - 请确保唯一。完整地址: + 请确保唯一,只能由小写字母和数字组成,不能超过6个字符。完整地址: