mirror of
https://github.com/formbricks/formbricks.git
synced 2026-03-13 12:39:25 -05:00
fix: consent question's checkbox should now have some text or default text mandatory
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
// extend this object in order to add more validation rules
|
||||
|
||||
import {
|
||||
ConsentQuestion,
|
||||
MultipleChoiceMultiQuestion,
|
||||
MultipleChoiceSingleQuestion,
|
||||
Question,
|
||||
@@ -13,6 +14,9 @@ const validationRules = {
|
||||
multipleChoiceSingle: (question: MultipleChoiceSingleQuestion) => {
|
||||
return !question.choices.some((element) => element.label.trim() === "");
|
||||
},
|
||||
consent: (question: ConsentQuestion) => {
|
||||
return question.label.trim() !== "";
|
||||
},
|
||||
defaultValidation: (question: Question) => {
|
||||
return question.headline.trim() !== "";
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user