Runs a JavaScript check in the browser for instant feedback and a PHP check on the server that fires even when JavaScript is disabled.
WordPress Plugin by Monday Digital
Stop out-of-area leads before they reach your inbox.
MDL Local Service Lead Validator checks the phone number in any form submission and blocks it if the area code falls outside the service area you configured.
No API calls, no third-party services, no recurring fees.
- Validation
- Client-side + Server-side
- Form integrations
- CF7, WPForms, Gravity Forms, Elementor
- Coverage
- NANP & 240+ countries
Quick Start
Up and validating in under five minutes
For US and Canada, go to Lead Validator → Settings → General, pick your states or provinces, confirm the active area codes list is populated, and save. Submit a test form from an out-of-area number to confirm blocking is working.
- Install and activate the plugin from WordPress.org or by uploading the ZIP.
- Go to Lead Validator → Settings → General.
- Use the country and region picker to select the areas you serve.
- Confirm the Active Area Codes field is populated, then click Save Settings.
- For international setups, go to the International tab, switch the mode, and review the country parsing rules.
- Submit a test form with an allowed number and one with a number outside your area to confirm both cases work.
Overview
Why this plugin exists
Local service businesses — plumbers, roofers, HVAC contractors, landscapers — generate form leads from their WordPress site but routinely receive enquiries from people outside their service area. Filtering these manually wastes time and distorts lead quality metrics.
MDL Local Service Lead Validator solves this at the form level. It extracts the area or regional code from the submitted phone number and compares it against the list you configured. If the code is not on the list, the submission is blocked before it ever reaches your inbox or CRM.
Works across your entire WordPress form stack
- Server-side hooks for Contact Form 7, WPForms, Gravity Forms, and Elementor Pro Forms
- Client-side JavaScript validation for instant in-browser feedback on any form
- A nonce-protected AJAX endpoint for custom forms that need a server-side check
Core Features
Why teams choose this for production WordPress sites
Search and select countries, states, provinces, or regions from a visual two-panel picker. The allowed code list updates automatically.
NANP mode handles US and Canada area codes. International mode supports multi-country setups with per-country dial code and prefix length configuration.
Server-side validation hooks for Contact Form 7, WPForms, Gravity Forms, and Elementor Pro Forms require no extra configuration.
Give any individual form its own allowed code list. Useful for campaign landing pages that serve a different region than the main site.
Optional logging stores a masked phone number, extracted area code, form plugin, form ID, and page URL for every blocked submission. Exportable as CSV.
Network admins can set a default allowed code list. Individual sites can inherit the network list or use their own.
All validation runs on your server using PHP and JavaScript. There are no API calls, no third-party services, and no per-lookup fees.
A nonce-protected lslv_validate_phone AJAX action lets custom HTML forms run server-side validation without a supported form plugin.
Full phone numbers are never stored. The log keeps only a masked version (e.g. 212-***-****) alongside the extracted area code.
Use Cases
When this plugin makes sense
Plumbers, electricians, roofers, and HVAC contractors serving a defined metro area can reject out-of-area enquiries before they consume sales team time.
Agencies managing sites for clients in different regions can set per-site or per-form code lists without touching form plugin settings.
A landing page targeting a specific city or zip range can use a per-form override that is tighter than the global site service area.
Businesses serving specific countries or regions outside North America can configure dial codes and prefix lengths for accurate international validation.
Technical Specifications
Deployment-ready at a glance
| Current version | 1.0.0 |
|---|---|
| Requires WordPress | 5.5 or higher |
| Tested up to | 6.7 |
| Requires PHP | 7.4 or higher |
| License | GPL-2.0+ |
| Validation modes | NANP (US/Canada), International |
| Form integrations | Contact Form 7, WPForms, Gravity Forms, Elementor Pro Forms |
| Frontend validation | JavaScript (submit event, capture phase) |
| Server validation | PHP hooks per supported form plugin |
| AJAX endpoint | lslv_validate_phone (nonce-protected) |
| Logging | Optional — masked phone only, CSV export |
| Multisite | Supported — network-wide default codes |
| External API calls | None |
| Author | Monday Digital |
Pricing & Licensing
Free and open source from day one
MDL Local Service Lead Validator is completely free under the GPL-2.0+ license. No premium tier, no per-lead fees, no upsells. Download it, configure your service area, and block out-of-area submissions permanently.
Product Screens
A visual tour of the plugin workflow
General settings
Select countries and regions using the world picker, then review the auto-built active area codes list.
International settings
Switch to International mode and manage per-country dial code and prefix length parsing rules.
Blocked leads log
Review every blocked submission with masked phone, area code, form plugin, form ID, and page URL. Export as CSV.
Frontend warning message
Inline warning shown below the phone field when a visitor submits a number outside the allowed service area.
Changelog
Initial release highlights
- World country and region picker for building the allowed area code list
- NANP mode for US and Canada phone number validation (3-digit area code)
- International mode with per-country dial code and regional prefix length rules
- Client-side JavaScript validation with instant in-browser feedback
- Server-side PHP validation for Contact Form 7, WPForms, Gravity Forms, and Elementor Pro Forms
- Nonce-protected
lslv_validate_phoneAJAX endpoint for custom HTML forms - Per-form area code overrides via Lead Validator → Form Overrides
- Blocked leads log with masked phone storage, sortable columns, and CSV export
- Multisite support with network-wide default allowed code list and per-site inheritance toggle
- Configurable phone field selector and target form selector for non-standard markup
- Automatic re-attach of submit listeners after Elementor popup renders
- Privacy-safe logging — full phone numbers are never stored
Documentation Snapshot
First-run flow for site owners
- Install and activate the plugin from WordPress.org or by uploading the ZIP.
- Go to Lead Validator → Settings → General.
- Use the country and region picker to select the areas you serve.
- Confirm the Active Area Codes field is populated, then click Save Settings.
- For international setups, go to the International tab, switch the mode, and review the country parsing rules.
- Submit a test form with an allowed number and one with a number outside your area to confirm both cases work.
Operational notes
- If Active Area Codes is left empty the plugin allows all submissions — nothing is blocked until at least one code is saved.
- Per-form overrides under Lead Validator → Form Overrides take priority over the global code list.
- Blocked lead logging is disabled by default. Enable it under Settings → Logging.
- For plain HTML forms without a supported plugin, wire your form to the <code>lslv_validate_phone</code> AJAX action for server-side checking.
Support & Updates
Clear expectations for maintenance and help
- Updates are delivered through the standard WordPress plugin update flow when new versions are published.
- Setup guidance is available on this page and through the WordPress.org plugin listing.
- Monday Digital can help with service area configuration, form plugin compatibility questions, and international mode setup.
- The release approach stays focused on production-ready validation reliability rather than feature bloat.
Quick trust cues
FAQ
Common questions from plugin users
The plugin allows all submissions. Nothing is blocked until at least one allowed code is saved in the Active Area Codes field.
For supported form plugins (Contact Form 7, WPForms, Gravity Forms, Elementor Pro Forms) the server-side hook still runs regardless of JavaScript. For plain custom HTML forms you need to wire the form to the plugin's AJAX endpoint to get a server-side check.
Yes. Switch to International mode under Settings → International and select the countries and regions you serve using the world picker on the General tab. The International tab lets you set a dial code and regional prefix length for each country in your service area.
Yes. Go to Lead Validator → Form Overrides, add a rule for the form's plugin type and form ID, and enter the codes for that form. The override takes priority over the global allowed code list.
No. Only a masked version is stored — for example 212-***-****. The area code is stored separately as a plain string. No complete phone number is ever written to the database.
No. Empty phone inputs are skipped entirely. Required-field enforcement remains the responsibility of your form plugin.
No. All validation runs locally on your server. There are no third-party services, no API fees, and no visitor data transmitted externally.
Yes. Network admins can set a default allowed code list at Network Admin → Settings → Lead Validator. Each site can choose to inherit the network list or maintain its own.
All plugin options are deleted from the database and the blocked leads log table is dropped. No data is left behind.
No. Leave them empty to use the plugin's built-in defaults. You only need to set a custom dial code or prefix length if the default parsing produces incorrect results for a specific country.
Related Links
Explore more in the Lab catalog
See the wider plugin directory and compare release posture, update style, and deployment fit.
Review release highlights and Lab release history in one place.