mirror of
https://gitee.com/apiadmin/ApiAdmin.git
synced 2025-04-06 03:58:00 +08:00
修复真实类库匹配规则:类库名允许包含下划线
This commit is contained in:
parent
0b7a6e889c
commit
c5fc138200
@ -73,7 +73,7 @@ class InterfaceList extends Base {
|
|||||||
*/
|
*/
|
||||||
public function add() {
|
public function add() {
|
||||||
$postData = $this->request->post();
|
$postData = $this->request->post();
|
||||||
if (!preg_match("/^[A-Za-z0-9\/]+$/", $postData['apiClass'])) {
|
if (!preg_match("/^[A-Za-z0-9_\/]+$/", $postData['apiClass'])) {
|
||||||
return $this->buildFailed(ReturnCode::DB_SAVE_ERROR, '真实类名只允许填写字母,数字和/');
|
return $this->buildFailed(ReturnCode::DB_SAVE_ERROR, '真实类名只允许填写字母,数字和/');
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -114,7 +114,7 @@ class InterfaceList extends Base {
|
|||||||
*/
|
*/
|
||||||
public function edit() {
|
public function edit() {
|
||||||
$postData = $this->request->post();
|
$postData = $this->request->post();
|
||||||
if (!preg_match("/^[A-Za-z0-9\/]+$/", $postData['apiClass'])) {
|
if (!preg_match("/^[A-Za-z0-9_\/]+$/", $postData['apiClass'])) {
|
||||||
return $this->buildFailed(ReturnCode::DB_SAVE_ERROR, '真实类名只允许填写字母,数字和/');
|
return $this->buildFailed(ReturnCode::DB_SAVE_ERROR, '真实类名只允许填写字母,数字和/');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user