=== Softech Country Phone Validator ===
Contributors: shravanchoudhary, echuaksingh
Donate link: https://www.paypal.com/paypalme/shrvn7
Tags: woocommerce, phone number validator, checkout phone validator, phone field, country flags
Requires at least: 6.0
Tested up to: 6.9
Requires PHP: 7.4
Stable tag: 1.0.2
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Add phone input with country flags, dial codes, and validation to WordPress forms and WooCommerce checkout (classic + blocks).
== Description ==
**Softech Country Phone Validator (SCPV)** is a powerful and flexible plugin that adds country flag dropdowns and format validation to any phone input field in WordPress.
It works seamlessly with:
π¨ Contact Form 7
π WPForms
π Forminator
π¨ Elementor Forms
π Gravity Forms
β‘ Ninja Forms
π§ Any other WordPress form plugin
ποΈ WooCommerce Checkout(Classic & blocks)
**Core Features:**
β Country dropdown with flags and international dial codes
β Live phone format validation based on selected country
β Set a default country globally
β Apply automatically to all `` fields or target with custom selectors
β Admin panel with options to enable WooCommerce, set defaults, and more
β Fully extensible and works with any form that uses HTML inputs
== Installation ==
1. Upload the plugin to `/wp-content/plugins/` or install via the WordPress plugin dashboard.
2. Activate through the βPluginsβ screen.
3. Go to **Settings > Phone Validator (SCPV)** to configure.
4. Add the `.scpv-phone-default` class to your phone fields, or define your custom selectors in settings.
== Frequently Asked Questions ==
= If something isn't addressed here, how can we connect with you? =
You're welcome to message us anytime using our Contact form.
= Does this support all WordPress form plugins? =
Yes! As long as your form has `` fields, you can use SCPV by adding a class or using the "Apply to all" option.
= Is WooCommerce Checkout (Blocks) supported? =
Yes. SCPV supports both the Classic and new WooCommerce Block-based checkout.
= Can I apply it to all phone fields automatically? =
Yes. Enable the "Apply to all tel fields" option in the plugin settings.
== Screenshots ==
1. Admin settings panel with WooCommerce options and custom selectors
2. Phone input field with country flag dropdown for WooCommerce
3. Phone input field with country flag dropdown for Contact Form 7
4. Phone input field with country flag dropdown for Wp Forms
5. Phone input field with country flag dropdown for Forminator
== External Libraries ==
This plugin uses the [intl-tel-input](https://github.com/jackocnr/intl-tel-input) library, licensed under the MIT License, to enhance phone number fields with international flags, dial codes, and formatting.
All required assets (CSS, JS, and utility scripts) are bundled locally within the plugin under the `assets/intl-tel-input/` directory. No external CDNs or remote file calls are used, ensuring full compliance with WordPress.org plugin guidelines.
The intl-tel-input library is included under the terms of the [MIT License](https://opensource.org/licenses/MIT).
== Changelog ==
= 1.0.2 =
* Fixed incorrect library file paths causing 404 errors on subfolder WordPress installations
* Corrected utils.js URL resolution to always use the dynamic plugin URL
* Minor bug fixes and internal code improvements
= 1.0.1 =
* Updated admin settings panel for improved usability
* Upgraded intl-tel-input library to the latest version
* Tested and optimized for the latest WordPress version
* Improved compatibility with WooCommerce checkout
* Enhanced phone field detection and validation in supported form plugins
= 1.0 =
* Initial release
* Support for CF7, WPForms, Forminator
* Admin settings panel added
* WooCommerce checkout (Classic + Blocks) support
* Default country and selector options
* Apply to all `` fields option
== Upgrade Notice ==
= 1.0.2 =
This update fixes library path issues, resolves 404 errors on subfolder installations, and includes minor bug fixes for improved stability.
= 1.0.1 =
This update improves admin settings, updates the intl phone input library, and ensures better compatibility with the latest WordPress, WooCommerce, and form plugins.
== License ==
This plugin is licensed under the GPLv2 or later.
See `license.txt` for full terms.
== Support ==
If you find this plugin useful, consider supporting us via [Softechure](https://www.softechure.com).