mirror of
https://github.com/formbricks/formbricks.git
synced 2025-12-29 01:39:54 -06:00
fix: Added if statement for preventing use of reserved word in question ID (#1435)
This commit is contained in:
@@ -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