Custom validation being applied to both responses | XM Community
Skip to main content
Solved

Custom validation being applied to both responses

  • June 19, 2019
  • 3 replies
  • 10 views

I'm trying to add custom validation (i.e. number entered needs to be between x and y otherwise show the message: 'please enter a valid postal code') for people who select that they currently reside 'Within the U.S.' (see below for screenshots). However, when I test the survey and select' Outside of the U.S.' (this should terminate the respondent from the survey), it's also applying the custom validation message ('please enter a valid postal code'). Any idea what I'm doing wrong? Any suggested alternatives? ! ! !

Best answer by JenCX

Can you just use the built-in functionality instead? ! Either way, you'll want to apply it just to the first option instead of the whole question.

3 replies

JenCX
Level 5 ●●●●●
Forum|alt.badge.img+11
  • Level 5 ●●●●●
  • 683 replies
  • Answer
  • June 19, 2019
Can you just use the built-in functionality instead? ! Either way, you'll want to apply it just to the first option instead of the whole question.

  • Author
  • 3 replies
  • June 19, 2019
That's a much better option, thanks!

TomG
Level 8 ●●●●●●●●
Forum|alt.badge.img+27
  • Level 8 ●●●●●●●●
  • 6083 replies
  • June 19, 2019
> @Beyond said: > I'm trying to add custom validation (i.e. number entered needs to be between x and y otherwise show the message: 'please enter a valid postal code') for people who select that they currently reside 'Within the U.S.' (see below for screenshots). However, when I test the survey and select' Outside of the U.S.' (this should terminate the respondent from the survey), it's also applying the custom validation message ('please enter a valid postal code'). > > Any idea what I'm doing wrong? Any suggested alternatives? > > ! > ! > ! > Add a new logic set - ORwith the condition "Outside the US" is selected.