Capital letter validation with Regix | XM Community
Skip to main content
Solved

Capital letter validation with Regix

  • June 29, 2020
  • 2 replies
  • 42 views

Good morning, first I did some searching in the forums and web for this but could only find answers pointing to Regex for my question. I already have the correct code for what I want to do, force capital letters and allow white space and or hyphens: ^[A-Z\\s\\-]*$ I have plugged it into Regex testing sites and it works perfectly, allowing only caps, spaces, and hyphens. However, when I put it into custom validation field in Qualtrics and test the question it passes with any letter entered in that field and does not seem to recognize my forced caps option...
What am I missing? Thanks so much for your help.

Best answer by SurajK

John_P - Try this regex - /^[A-Z\\s\\-]*$/, it should work fine

2 replies

SurajK
QPN Level 3 ●●●
Forum|alt.badge.img+4
  • QPN Level 3 ●●●
  • Answer
  • June 29, 2020

John_P - Try this regex - /^[A-Z\\s\\-]*$/, it should work fine


  • Author
  • June 29, 2020

Oh jeeze, the / at start and end was what it needed. 🤦‍♂️ Thanks so much!