No image available

customer_form_validation

Hi! Here is a simple module that will allow you to apply additional validation to customer address fields. In the first version it works like this: 1. You can validate the phone number using the libphonenumber library. It's a code based on how Google validates phone numbers on Android system, so quite a fancy tool. It works this way:  - if the phone number has a country prefix (+XX), it is validated according to the rules for prefixed country  - if the phone number does not have a country prefix, it is validated according to rules for the selected country in the form 2. You can validate the ad

Developed by Daresh

Get This Module Free on PS Forum EN
PS 8.0 License: Unknown Status: Unknown Health: Good

Info updated 1 month ago

Sources
PS Forum EN Visit →
Type
Module

Info checked: Mar 2, 2026

Hi! Here is a simple module that will allow you to apply additional validation to customer address fields. In the first version it works like this: 1. You can validate the phone number using the libphonenumber library. It's a code based on how Google validates phone numbers on Android system, so quite a fancy tool. It works this way:  - if the phone number has a country prefix (+XX), it is validated according to the rules for prefixed country  - if the phone number does not have a country prefix, it is validated according to rules for the selected country in the form 2. You can validate the address1 field using a given (configurable) regular expression. The default one is actually quite simple and all it does is assuring that the address contains at least two letters and a number anywhere. It's mainly to make sure your customers will not omit home number in the address. Of course it's not perfect, but address validation is a hard task, that's why you can always customize the regular expression to your needs. The module supports PrestaShop 8+ mainly because I am using the "lite" version of the libphonenumber library, which is quite new and requires PHP 8 to run. After installing the module, you can adjust the error messages using the standard PrestaShop translation panel. Looking forward to your comments and tests! 🙂 gmadmitter_1_0_0.zip  

  • Riferimento
    customer_form_validation

  • License
    Unknown
  • PS Compatibility
    8.x
  • Status
    Unknown

Commenti (0)

Ancora nessuna recensione da parte degli utenti.
Caricamento in corso ...