Browse Source

fix json key validation check (#341)

Signed-off-by: ryjiang <jiangruiyi@gmail.com>
ryjiang 1 year ago
parent
commit
da41036e7f
1 changed files with 1 additions and 1 deletions
  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 is json, check the json key is valid
     if (type === DataTypeStringEnum.JSON) {
     if (type === DataTypeStringEnum.JSON) {
-      isKeyLegal = /^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(jsonKeyValue.trim());
+      isKeyLegal = jsonKeyValue.trim() !== '';
     }
     }
 
 
     setIsKeyLegal(isKeyLegal);
     setIsKeyLegal(isKeyLegal);