Custom Validation for Side by Side Question | XM Community
Skip to main content

How can I require 0-30 number validation for text-entry boxes in one column without forcing a response? I tried a previous post’s suggestion for custom validation, letting each field be </=30 or empty. However, in testing, it won’t accept empty fields and requires a response for each. What am I doing wrong here?

Custom Validation Attempts
Error message when try to leave fields empty in preview

 

I previously tried entering some posted javascript to set the 0-30 values. However, it applied it to the text entry box for “Other,” too, despite manually having this set to require non-numerical text. If javascript is the answer, how can I tweak the code to only apply to the text boxes in one column?

Hi @kpp ,

...

Custom Validation Attempts

...

 

I tested a side-by-side question with 3 statements using the same validation condition as your screenshot and it seems to be working fine.

Perhaps there may be

1) some OR that are accidentally place as AND in the other statement conditions.

2) some additional condition(s) involving other column(s) being added to this custom validation.

 


Thanks for you help and suggestions. Unfortunately, I’m still stuck. The rest of the fields in this one column are set up the same and are the only things included in the custom validation. I even tried removing the text entry validation for this numerical column and for the text entry box in the first column, but it didn’t make a difference.

The weirdest thing is that even when I do enter a number in every field, and answer all other questions in the matrix, I still get the same error message when trying to proceed in the survey from block preview.

 

The questionnaire was working perfectly, sans #-max, before I added the custom validation. Here’s the last entry, in case I’m missing something extra at the end:

 


Shoot, turns out I’m a dummy and in another pass noticed I had in fact overlooked one of the “Or … Empty” being an “And.” 🤦Thanks!


Leave a Reply