RegEx email validation in 1.91

More
3 years 3 months ago #105733 by AndrejL
AndrejL created the topic: RegEx email validation in 1.91
Hi!

I can seem to validate an email address. I'm using short free text question on a Limesurvey 1.91+ version.

When I put

"/^(\w[-._+\w]*\w@\w[-._\w]*\w\.\w{2,3})$/"

in validation filed and click Save RegEx changes to

"/^(\\w[-._+\\w]*\\w@\\w[-._\\w]*\\w\\.\\w{2,3})$/" (double slashes inside).

And of course it doens't not work. What am I doing wrong?

Thank you,

Andrej

Please Log in to join the conversation.

More
3 years 3 months ago #105736 by Ben_V
Ben_V replied the topic: RegEx email validation in 1.91
Hi,

/(\w[-._\w]*\w@\w[-._\w]*\w\.\w{2,3})/

Cf. doc ;)

Benoît

EM Variables => bit.ly/1TKQyNu | EM Roadmap => bit.ly/1UTrOB4
Last Releases => 2.6x.x goo.gl/ztWfIV | 2.06/2.6.x => bit.ly/1Qv44A1
Demo Surveys => goo.gl/HuR6Xe (already included in /docs/demosurveys)

Please Log in to join the conversation.

More
3 years 3 months ago #105739 by AndrejL
AndrejL replied the topic: RegEx email validation in 1.91

Ben_V wrote: Hi,

/(\w[-._\w]*\w@\w[-._\w]*\w\.\w{2,3})/

Cf. doc ;)


It's the same. If I insert your /(\w[-._\w]*\w@\w[-._\w]*\w\.\w{2,3})/ and save

it changes to /(\\w[-._\\w]*\\w@\\w[-._\\w]*\\w\\.\\w{2,3})/

Please Log in to join the conversation.

More
3 years 2 months ago #105776 by Ben_V
Ben_V replied the topic: RegEx email validation in 1.91
very weird...

Have a look at this previous post to get an example about how you can set your regex using embeded javascript.

On the other hand, maybe it's time to update your installation if you can, for the less to the 1.92 release.

Benoît

EM Variables => bit.ly/1TKQyNu | EM Roadmap => bit.ly/1UTrOB4
Last Releases => 2.6x.x goo.gl/ztWfIV | 2.06/2.6.x => bit.ly/1Qv44A1
Demo Surveys => goo.gl/HuR6Xe (already included in /docs/demosurveys)

Please Log in to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now