From d5da269cdc6708d7a42f8929bcdcba6beb461fae Mon Sep 17 00:00:00 2001 From: ZhuangYumin Date: Sun, 17 Dec 2023 05:52:04 +0000 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=BA=86=E6=96=87=E6=9C=AC?= =?UTF-8?q?=E9=95=BF=E5=BA=A6=E8=BF=87=E5=A4=A7=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/Web/validator.js | 1 + 1 file changed, 1 insertion(+) diff --git a/frontend/Web/validator.js b/frontend/Web/validator.js index be455f4..554fc34 100644 --- a/frontend/Web/validator.js +++ b/frontend/Web/validator.js @@ -35,6 +35,7 @@ async function IsValid(text) { // 再去除换行和回车 //text = text.replace(/[\r\n]/g, ""); console.log("after replace: "+text); + if(text.length==0||text.length>590) return true; // 通过以下代码创建API请求并设置参数。 const params = { // 文本检测service:内容安全控制台文本增强版规则配置的serviceCode,示例:chat_detection