فهرست منبع

fix json key validation check (#341)

Signed-off-by: ryjiang <jiangruiyi@gmail.com>
ryjiang 1 سال پیش
والد
کامیت
da41036e7f
1فایلهای تغییر یافته به همراه1 افزوده شده و 1 حذف شده
  1. 1 1
      client/src/components/advancedSearch/Condition.tsx

+ 1 - 1
client/src/components/advancedSearch/Condition.tsx

@@ -54,7 +54,7 @@ const Condition: FC<ConditionProps> = props => {
 
     // if type is json, check the json key is valid
     if (type === DataTypeStringEnum.JSON) {
-      isKeyLegal = /^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(jsonKeyValue.trim());
+      isKeyLegal = jsonKeyValue.trim() !== '';
     }
 
     setIsKeyLegal(isKeyLegal);