Skip to content

Validate phone numbers in contact forms by adding the inputmask script to the WordPress website

License

Notifications You must be signed in to change notification settings

d1egovasquez/phone_validator_wp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WordPress Chilean Phone Number Validation

This GitHub repository contains a simple code snippet designed to validate Chilean phone number formats in WordPress forms. The provided code ensures that users enter valid Chilean phone numbers when submitting forms on your WordPress website.

Purpose

The purpose of this repository is to offer a straightforward solution for adding phone number validation to forms in WordPress, specifically targeting Chilean phone numbers. By incorporating this code into your WordPress project, you can enhance user experience by prompting users to enter correctly formatted Chilean phone numbers.

Features

  • Validates the format of Chilean phone numbers entered into form fields.
  • Provides an error message for invalid Chilean phone number formats.
  • Can be easily integrated into various forms across your WordPress website.

How to Use

  1. Download Code: Clone this repository or download the functions.php file directly.

  2. Integration: Integrate functions.php code into your WordPress theme functions file, or copy and paste the code into an appropriate file within your project.

  3. Form Field: Add a phone number input field to your form for users to input their Chilean phone numbers. For example:

  4. Include Script: Include the JavaScript provided in the footer.php file within your project. This script enables real-time validation as users type their Chilean phone numbers, so copy in your footer theme or in same page where you have your form.

Contributors

Contributions to this repository are welcome! Feel free to make suggestions, report bugs, or add new features by creating pull requests.

License

This project is licensed under the GNU General Public License, version 3 or later. This license allows you to use, modify, and distribute the code under the terms of the GNU GPL.


We hope this code snippet simplifies the process of implementing Chilean phone number validation for your WordPress forms. If you have any questions, encounter issues, or want to share feedback, please create an issue in this repository. Enjoy coding!

About

Validate phone numbers in contact forms by adding the inputmask script to the WordPress website

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published