Entry box that only allows letters or a character | XM Community
Skip to main content
Question

Entry box that only allows letters or a character

  • May 28, 2023
  • 2 replies
  • 143 views

Forum|alt.badge.img+2

I want to create some sort of a validation in Qualtrics to ensure a person only enters a letter or a character, as may be the case for someone who users snr. or jnr. in their last name. How do go about this; the custom validation does not seem to have this, and I see a provision for JavaScript but am not familiar. Your help would be highly appreciated. 

 

Regards. 

2 replies

Deepak
QPN Level 8 ●●●●●●●●
Forum|alt.badge.img+46
  • May 28, 2023

@DGM 

You can include custom validation matches regex and include the below to only allow upper/lower case letters:

/^[A-Za-z]+$/

Hope it helps!


Forum|alt.badge.img+2
  • Author
  • Level 1 ●
  • May 28, 2023

Thank you, but this worked. 

/^[A-Za-z\s.]+$/ 

It provides for both a period and white space.