#403 添加项目用途字符串输入时的检查

This commit is contained in:
Li Jianxuan 2012-10-16 03:29:43 +00:00
parent 4d568916f3
commit 4e42f80e92
1 changed files with 12 additions and 0 deletions

View File

@ -1001,6 +1001,18 @@ class DataController extends Zend_Controller_Action
exit();
}
if(mb_strlen($datas['project'],"utf-8")<8)
{
echo $form.'<script>alert("项目介绍内容不少于8个字符")</script>';
exit();
}
if(preg_match('/^\d+$/',$datas['project']))
{
echo $form.'<script>alert("请输入有意义的项目介绍内容")</script>';
exit();
}
$data = array(
'userid' => $userid,
'username' => $datas['username'],