Welcome, Guest
Username: Password: Remember me

TOPIC: RegEx email validation in 1.91

RegEx email validation in 1.91 8 months 3 days ago #105733

  • AndrejL
  • AndrejL's Avatar
  • OFFLINE
  • Bronze Donor
  • Posts: 35
  • 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 8 months 3 days ago #105736

  • Ben_V
  • Ben_V's Avatar
  • OFFLINE
  • Platinum Lime
  • Posts: 1125
  • Thank you received: 259
  • Karma: 79
Hi,

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

Cf. doc ;)
Benoît

goo.gl/Bw5iM => Recherche GG dans le forum français (remplacer "exemple" dans la barre de recherche)
goo.gl/WX8PH => GG search for english forum (Replace "example" in the search bar)
goo.gl/IxiGu => Búsqueda en el foro en español (Cambiar "ejemplo" en la barra de...
The administrator has disabled public write access.

RegEx email validation in 1.91 8 months 3 days ago #105739

  • AndrejL
  • AndrejL's Avatar
  • OFFLINE
  • Bronze Donor
  • Posts: 35
  • 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 7 months 4 weeks ago #105776

  • Ben_V
  • Ben_V's Avatar
  • OFFLINE
  • Platinum Lime
  • Posts: 1125
  • Thank you received: 259
  • Karma: 79
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

goo.gl/Bw5iM => Recherche GG dans le forum français (remplacer "exemple" dans la barre de recherche)
goo.gl/WX8PH => GG search for english forum (Replace "example" in the search bar)
goo.gl/IxiGu => Búsqueda en el foro en español (Cambiar "ejemplo" en la barra de...
The administrator has disabled public write access.
Moderators: ITEd
Time to create page: 0.105 seconds
Donation Image