Skip to Content Skip to Menu

Help with Regex - Validate custom fields

  • alorri
  • alorri
  • OFFLINE
  • Posts: 4
  • Thanks: 0
  • Karma: 0
13 years 1 month ago #176780 by alorri
Hi, I have a problem with the regular expressions to validate custom fields.
For example, I just want to check email addresses syntax: i go to "field manager", i select the "email" field, then i set the "Authorized input" into "custom PERL regular expression" and add the code.
I tried several ones, included the one found on

www.regular-expressions.info/email.html

[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?

but nothing seems to work. I just can enter any iput, even a single string without any @ or dot, and it accepts it.

Am i doing something wrong? Any idea?

thanks for the help

Please Log in or Create an account to join the conversation.

  • zakala
  • zakala
  • OFFLINE
  • Posts: 1
  • Thanks: 0
  • Karma: 0
13 years 4 weeks ago - 13 years 4 weeks ago #177040 by zakala
I have the same problem trying to validate UK telephone numbers. I've tried a number of RegEx strings, but they don't appear to work. Do PERL regular expressions use an alternative syntax?
Last edit: 13 years 4 weeks ago by zakala.

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum