Welcome, Guest
Username: Password: Remember me

TOPIC: RegEx email validation in 1.91

RegEx email validation in 1.91 1 year 11 months ago #105733

  • AndrejL
  • AndrejL's Avatar
  • Offline
  • Junior Lime
  • Posts: 39
  • Karma: 1
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
The administrator has disabled public write access.

RegEx email validation in 1.91 1 year 11 months ago #105736

  • Ben_V
  • Ben_V's Avatar
  • Offline
  • Platinum Lime
  • Posts: 1595
  • Thank you received: 391
  • Karma: 103
Hi,

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

Cf. doc ;)
Benoît
The administrator has disabled public write access.

RegEx email validation in 1.91 1 year 11 months ago #105739

  • AndrejL
  • AndrejL's Avatar
  • Offline
  • Junior Lime
  • Posts: 39
  • Karma: 1
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})/
The administrator has disabled public write access.

RegEx email validation in 1.91 1 year 11 months ago #105776

  • Ben_V
  • Ben_V's Avatar
  • Offline
  • Platinum Lime
  • Posts: 1595
  • Thank you received: 391
  • Karma: 103
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
The administrator has disabled public write access.
Moderators: ITEd
Time to create page: 0.132 seconds