- Posts: 29
- Thank you received: 1
Edit Postal Code to acept only numbers
8 years 8 months ago #289039
by mazin07
Edit Postal Code to acept only numbers was created by mazin07
-- url of the page with the problem -- :
umbandaexplica.com.br/loja/
-- HikaShop version -- : 3.2.2
Hi there,
I want to know how to make the users put only numbers in the Zip Code field. Currently they can put "12365-5623" "abd2454" and so on.
Thankful.
-- HikaShop version -- : 3.2.2
Hi there,
I want to know how to make the users put only numbers in the Zip Code field. Currently they can put "12365-5623" "abd2454" and so on.
Thankful.
Please Log in or Create an account to join the conversation.
8 years 8 months ago #289043
by Jerome
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Replied by Jerome on topic Edit Postal Code to acept only numbers
Hello,
You have to use the regular expression check.
See : www.hikashop.com/support/documentation/1...ield-form.html#infos
For more details :
www.regular-expressions.info/tutorial.html
www.hikashop.com/forum/content-creation/...message-to-user.html
www.hikashop.com/forum/shipping-methods/...pping-addresses.html
Regards,
You have to use the regular expression check.
See : www.hikashop.com/support/documentation/1...ield-form.html#infos
For more details :
www.regular-expressions.info/tutorial.html
www.hikashop.com/forum/content-creation/...message-to-user.html
www.hikashop.com/forum/shipping-methods/...pping-addresses.html
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Please Log in or Create an account to join the conversation.
8 years 8 months ago #289099
by mazin07
Replied by mazin07 on topic Edit Postal Code to acept only numbers
Hi Jerome, it worked perfectly.
But I made some changes. In the documentation speak to use only [0-9] + but this causes special characters to be used or letters. The code only causes the first character to be a number from 0-9.
I used the following code: ^ [0-9] + $ and it works perfectly. Only numbers, no letters or special characters.
Very Thanks
But I made some changes. In the documentation speak to use only [0-9] + but this causes special characters to be used or letters. The code only causes the first character to be a number from 0-9.
I used the following code: ^ [0-9] + $ and it works perfectly. Only numbers, no letters or special characters.
Very Thanks
Please Log in or Create an account to join the conversation.
Time to create page: 0.053 seconds