How can I check if in a textbox the last character is a questionmark? | XM Community
Skip to main content
Solved

How can I check if in a textbox the last character is a questionmark?


Nico_Leussink
Level 2 ●●
Forum|alt.badge.img+5
Is it possible to validate on the last character of a text entry field? The entry is only valid if the last character is a questionmark (?).

Best answer by TomG

Use custom validation, must match regex with the regex `.*\\?$`
View original

3 replies

TomG
Level 8 ●●●●●●●●
Forum|alt.badge.img+27
  • Level 8 ●●●●●●●●
  • 5926 replies
  • Answer
  • May 1, 2018
Use custom validation, must match regex with the regex `.*\\?$`

Nico_Leussink
Level 2 ●●
Forum|alt.badge.img+5
  • Author
  • Level 2 ●●
  • 24 replies
  • May 1, 2018
Thanks Tom, this works!

Forum|alt.badge.img+1
  • QPN Level 2 ●●
  • 25 replies
  • August 6, 2018
@Nico_Leussink , it may be achieved through javascript. Store text value in some variable(let text_input) and check if charAt(text_input.length - 1) == '?'

Leave a Reply