1
This commit is contained in:
@@ -701,6 +701,19 @@ class Reviewer extends Controller
|
||||
return jsonError("Non repeatable review");
|
||||
}
|
||||
|
||||
//验证字数
|
||||
$content = $data['qu9contents']." ".$data['qu10contents']." ".$data['qu11contents']." ".$data['qu12contents']." ".$data['qu13contents']." ".$data['qu14contents']." ".$data['qu15contents']." ".$data['comment'];
|
||||
if(preg_match('/[\x{4e00}-\x{9fa5}]/u', $content)>0){//含有中文
|
||||
if(mb_strlen($content, 'UTF8')<60){
|
||||
return jsonError("We encourage you to enrich your comment further to help improve the peer paper (at least 60 words).");
|
||||
}
|
||||
}else{//不含中文
|
||||
$carray = explode(" ", $content);
|
||||
if(count($carray)<60){
|
||||
return jsonError("We encourage you to enrich your comment further to help improve the peer paper (at least 60 words).");
|
||||
}
|
||||
}
|
||||
|
||||
//组合insert数据,存储
|
||||
$insert_data['art_rev_id'] = $data['art_rev_id'];
|
||||
$insert_data['qu1'] = $data['qu1'];
|
||||
|
||||
Reference in New Issue
Block a user