|
@@ -116,7 +116,7 @@ class UserLogic
|
|
|
$user = User::getUserById($post['id']);
|
|
$user = User::getUserById($post['id']);
|
|
|
if (empty($user)) return '用户不存在';
|
|
if (empty($user)) return '用户不存在';
|
|
|
|
|
|
|
|
- if (empty($post['recycle_count']) || $post['recycle_count'] < 0 || $post['recycle_count'] > 500) {
|
|
|
|
|
|
|
+ if (empty($post['recycle_count']) || !preg_match("/^[1-9][0-9]*$/", $post['recycle_count']) || $post['recycle_count'] > 500) {
|
|
|
return '回收卡数量格式有误';
|
|
return '回收卡数量格式有误';
|
|
|
}
|
|
}
|
|
|
|
|
|