Regular expression for email

If you are runnig Joomla 3.x and Virtuemart 3.x please post to this forum your questions or support tickets about One Page Checkout

Regular expression for email

Postby martin@.....cz » Tue May 17, 2022 1:27 pm

Hi. I try setup regex for email. And not work.
I used Regex Generator for any regular expression. For email all dont work, because other regular expression replace it. Cart use one Regular expression like "use any words and @" thats all. All my overtures are replace.
Even the one that works for the phone number pattern="^\d{9}$" is outvoted by something else. I suspect Virtuemart does it directly. But I didn't find anything in the customer fields :(
martin@.....cz
 
Posts: 7
Joined: Mon Apr 29, 2019 7:45 pm

Re: Regular expression for email

Postby admin » Fri Nov 25, 2022 4:49 pm

hello, email is a special field which has it's own validation (and/or regex)

for all other fields:
- regex is either based "per country"
- or is globally set including pattern

i.e.:
global config (html 5 pattern):
Code: Select all
pattern="[0-9]{5}"


per country config (netherlands):
Code: Select all
[1-9][0-9]{3}\s?[a-zA-Z]{2}|[1-9][0-9]{3}[a-zA-Z]{2}


it can be used for phones or other inputs (but not email) same way - it has to meet HTML5 regex specifications.

best regards, stan
admin
Site Admin
 
Posts: 2708
Joined: Wed Jan 06, 2010 11:43 pm


Return to One Page Checkout for Virtuemart 3 on Joomla 3.x

cron