Validation | XM Community

Validation

  • 28 February 2020
  • 3 replies
  • 15 views

Userlevel 7
Badge +33
We want to apply validation like an error message but not force response, so first time when someone click next button an error message displays , Please fill and if someone click next time it go to next page. Also i want to have warning if someone put email or phone but not in format (phone should be 7 to 11 digit).

Name (First):
Name (Last):
[Phone number:]
[Email Address:]

Any suggestion

3 replies

Userlevel 4
Badge +3
Hi Piyush, For error message you can use - Request Response instead of Forced Response to show the error message once and for email or phone format you can either use custom validation or javascript.
Userlevel 7
Badge +33
can you provide java script, if we use custom validation it will become force response.
Badge +2
Hi @PeeyushBansal,

This is a bit complicated using the base features, but I think it can be done. JavaScript would be a more elegant solution if you have those skills.

If you have to implement the double click format, I'd suggest creating a second version of the question with display logic (If X is empty would be the condition) and a custom warning message in the question text. However, if you're comfortable with a slightly different format, I'd make use of the request response feature (https://uploads-us-west-2.insided.com/qualtrics-us/attachment/8g_wtz9qaiozvf5.png).

For the email and phone format validation, it can change a lot depending how you're formatting the questions and what text type you're using. Assuming this is being done using a 4 field form text entry question, you're going to need to create custom validation that includes separate conditions for everything.

Validation conditions for formatting
If email is empty and phone number is empty
OR If email is not empty and email contains @ and email contains . and phone number is empty
OR If phone number is not empty and phone number is greater than 999999 and phone number is less than 100000000000 and email is empty
OR If email is not empty and email contains @ and email contains . and phone number is not empty and phone number is greater than 999999 and phone number is less than 100000000000

With those conditions, the request response function will work normally except respondents will be forced to properly format any email or phone number they provide. I would suggest creating a custom warning message to explain the requirements (https://uploads-us-west-2.insided.com/qualtrics-us/attachment/e2_yhr6dfnfywwa.png).

Best of luck,

Elliot V.W.

Leave a Reply