mirror of
https://github.com/formbricks/formbricks.git
synced 2026-05-13 03:16:58 -05:00
fix: Added if statement for preventing use of reserved word in question ID (#1435)
This commit is contained in:
+5
@@ -40,6 +40,11 @@ export default function UpdateQuestionId({
|
||||
updateQuestion(questionIdx, { id: prevValue });
|
||||
toast.error("ID should not be empty.");
|
||||
return;
|
||||
} else if (currentValue === "source" || currentValue === "suID" || currentValue === "userId") {
|
||||
setCurrentValue(prevValue);
|
||||
updateQuestion(questionIdx, { id: prevValue });
|
||||
toast.error("ID cannot used reserved words.");
|
||||
return;
|
||||
} else {
|
||||
setIsInputInvalid(false);
|
||||
toast.success("Question ID updated.");
|
||||
|
||||
Reference in New Issue
Block a user