Capital letter validation with Regix | XM Community
Solved

Capital letter validation with Regix

  • 29 June 2020
  • 2 replies
  • 20 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.

icon

Best answer by SurajK 29 June 2020, 18:14

View original

2 replies

Userlevel 5
Badge +4

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

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

Leave a Reply