Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

Bug: validation error message doesn't disappear

  • MooMarc
  • MooMarc's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
2 years 3 months ago #223444 by MooMarc
LimeSurvey version: 3.24.2
University server
==================
I tried a simple regex validation rule to prevent newline in a large text field:

/^.*$/

It works in the sense that the error message "Please check the format of your answer." appears when I press enter in the field, but this message does not disappear when I remove the newline.  I tried something similar with another character (not newline) and the same thing happens: the error message does not disappear after the unwanted character is deleted.
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
2 years 3 months ago #223447 by Joffm
Hi,
this is not a bug but the default behaviour.
If you use this for validation
 
you will get the default message text

If there is an error in the "error color"
 

If there is no error in the default text color.
 

And this is fine, because this text does not indicate an error but requires your attention to the format.
Error or not is shown by the color and of course you cannot proceed in case of an error.

If you want to have a more specific error text - and no text if there is no error - you should use the question validation equation and the question validation tip
Like
 

Then you may get this
 



Joffm

 

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The topic has been locked.
  • MooMarc
  • MooMarc's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
2 years 3 months ago #223465 by MooMarc
I see. The color didn't change for me, possibly a template thing. It still seems like an error message to me with the icon and the way it appears. But thanks for the solution!
The topic has been locked.
  • MooMarc
  • MooMarc's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
2 years 3 months ago - 2 years 3 months ago #223469 by MooMarc
The message disappears, but the exclamation icon stays:
 

Actually, is there simply a way to prevent the entry of newlines, or to delete them in the saved answer?  
Last edit: 2 years 3 months ago by MooMarc.
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
2 years 3 months ago #223470 by Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose