Help with Regex - Validate custom fields

12 years 7 months 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 to join the conversation.

12 years 7 months ago - 12 years 7 months 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?

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.212 seconds

Facebook Twitter LinkedIn