Can I have more than 1 error message for different custom validation issues in the same question? | XM Community
Skip to main content
Solved

Can I have more than 1 error message for different custom validation issues in the same question?

  • June 10, 2020
  • 1 reply
  • 207 views

I think this is something I could solve or find alternatives to with Javascript, but I am at a pretty low level with that. But for one of my questions I am using custom validation for a few different things, and I would like unique error messages to pop up depending on which custom validation issue occurs. Is there a way to do this?
Thank you!

Best answer by TomG

In the addOnload function you need to check if the Validation Error (has class ValidationError) contains your custom validation message. If it does you then have to replicate your custom validation logic in JS to figure out what message to display and update the ValidationError text.

View original

1 reply

TomG
Level 8 ●●●●●●●●
Forum|alt.badge.img+27
  • Level 8 ●●●●●●●●
  • 5911 replies
  • Answer
  • June 10, 2020

In the addOnload function you need to check if the Validation Error (has class ValidationError) contains your custom validation message. If it does you then have to replicate your custom validation logic in JS to figure out what message to display and update the ValidationError text.


Leave a Reply