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

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


Userlevel 3
Badge +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 (?).
icon

Best answer by TomG 1 May 2018, 20:39

View original

3 replies

Userlevel 7
Badge +27
Use custom validation, must match regex with the regex `.*\\?$`
Userlevel 3
Badge +5
Thanks Tom, this works!
Badge +1
@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