VirtueMart Forum

VirtueMart 2 + 3 + 4 => General Questions => Topic started by: tega on July 20, 2019, 03:32:14 AM

Title: Zip code validation on registration.
Post by: tega on July 20, 2019, 03:32:14 AM
Hello,

I've looked everywhere and didn't find anything like this. I would like to force the users that register using vm registration page, to introduce the zip code on the exact format used on my country which is I xxxx-xxx (4 numbers a dash and 3 numbers). I know the regexp is \d{4}-\d{3} but I don't know where to put it. Ive found a similar post but was for VM2 to edit a file that doesn't exist anymore on VM3. Also found a lot of plugins and extensions but all of them what they do is check the zip code on the shipping methods.

Any suggestions?
Title: Re: Zip code validation on registration.
Post by: Studio 42 on July 20, 2019, 11:17:53 AM
Put a javascript in the cart view and you enable/disable the confirm button depending the validity of the ZIP code