Skip to content

Commit

Permalink
fix json key validation check (#341)
Browse files Browse the repository at this point in the history
Signed-off-by: ryjiang <jiangruiyi@gmail.com>
  • Loading branch information
shanghaikid authored Dec 14, 2023
1 parent 12cefeb commit da41036
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion client/src/components/advancedSearch/Condition.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit da41036

Please sign in to comment.