For question 'custom validation', what is the expected format of the 'Contains' condition? | XM Community
Skip to main content
I was not able to find any documentation on what the Contains condition expects or accepts, so here is what I learned. The Contains condition is a 'single-value' condition that strictly looks for the value entered in the condition. If you have a Contains value of '0-20', the Contains condition WILL NOT check that only numbers 0-20 are entered into the question field. Validation for the Contains condition will ONLY pass if you enter '0-20' or you enter a phrase that contains the value '0-20', such as _'The fox was expected to work between 0-20 hours per week'_ (this phrase would pass validation for the condition).



The Contains condition DOES NOT accept wildcards from what I have found and is strict. A Contains condition of '*.jpeggy' will not pass for values such as 'fox.jpeggy'. A phrase such as 'The fox tried to find his image using the *.jpeggy search string' would pass, but a phrase such as 'The fox tried to find his image using the foxy.jpeggy search string' would fail.



Hope this helps.
Hi @w.patrick.gale



Contains is for inbetween



For text validation match regex work . Contain is for number type.

Leave a Reply