Check out the LimeSurvey source code on GitHub!
Welcome, Guest
Username: Password:

TOPIC: RegEx validation always firing errors when submit form

RegEx validation always firing errors when submit form 2 years 5 months ago #105609

Hello,

Everytime I put a regex validation in a question, the JavaScript validator works well but the form send me an error telling me that a field is not answered.

My RegEx is similar to /^[\d!#$%&'*+./=?_`a-z{|}~^\-]+@[\d.a-z\-]*gmail\.com\b/ and my question is required.

Without the RegEx, everything is fine.

Do I miss something? Do you have any suggestions?
The administrator has disabled public write access.

RegEx validation always firing errors when submit form 2 years 5 months ago #105630

  • tpartner
  • tpartner's Avatar
  • Online
  • LimeSurvey Team
  • Posts: 6133
  • Thank you received: 1362
  • Karma: 535
The problem may be the curly braces in the regex - see the note here - manual.limesurvey.org/Workarounds:_Manip...ime_using_Javascript.


.
Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The administrator has disabled public write access.

RegEx validation always firing errors when submit form 2 years 5 months ago #105667

Thanks for your quick answer.
I will manage it another way :-)
The administrator has disabled public write access.
Moderators: ITEd
Time to create page: 0.192 seconds
Imprint                   Data Protection Statement                  Revocation information and revocation form