PHPackages                             qcubed/phonetextbox - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Validation &amp; Sanitization](/categories/validation)
4. /
5. qcubed/phonetextbox

ActiveQcubed-library[Validation &amp; Sanitization](/categories/validation)

qcubed/phonetextbox
===================

QCubed text box plugin that validates U.S. phone numbers.

v4.0.1-alpha(8y ago)021MITPHPPHP &gt;=5.3

Since May 23Pushed 8y ago5 watchersCompare

[ Source](https://github.com/qcubed/phonetextbox)[ Packagist](https://packagist.org/packages/qcubed/phonetextbox)[ RSS](/packages/qcubed-phonetextbox/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (1)DependenciesVersions (2)Used By (0)

PhoneTextBox and qcubed.phonetextbox.js
=======================================

[](#phonetextbox-and-qcubedphonetextboxjs)

PhoneTextBox for QCubed v4
--------------------------

[](#phonetextbox-for-qcubed-v4)

PhoneTextBox is a simple extension of the \\QCubed\\Control\\TextBox control that allows you to easily validate and format the phone numbers that users provide. That format is (xxx) xxx-xxxx. Validation and re-formatting happen when the user tabs out or somehow else leaves the QPhoneTextBox, giving focus to another control.

If the user enters something different - for example, a phone number without spaces like 1112223344, it will be reformatted to (111) 222-3344 if possible. Same with inputs like 111-222-3344, etc.

PhoneTextBox allows you to specify an optional default area code - in those cases when you can predict what the user's area code most likely is. In the example below, we're using 650 as the default area code. That said, the user can freely delete that default and put in any area code they want.

Note that the control currently supports only North American phone formats - it can be easily extended to support other formats as well. If you do end up writing an extension of this control, please do share it.

This control is now installable by Composer. To install, execute the following on your command line from within your main installation directory:

```
	composer require qcubed/phonetextbox

```

qcubed.phonetextbox.js
----------------------

[](#qcubedphonetextboxjs)

The jQuery code this is based on is also a standalone jQuery plugin. The plugin requires jQuery UI 1.9 or greater, as it uses the jQuery widget factory. See the comments there for usage.

###  Health Score

21

—

LowBetter than 19% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity44

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

3273d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/dd62ae6695bf1109cc028b7a2c41ae4b28462211c9c48db1bc19083351ac88e5?d=identicon)[qcubed](/maintainers/qcubed)

---

Top Contributors

[![spekary](https://avatars.githubusercontent.com/u/755757?v=4)](https://github.com/spekary "spekary (3 commits)")

---

Tags

phoneqcubed

### Embed Badge

![Health badge](/badges/qcubed-phonetextbox/health.svg)

```
[![Health](https://phpackages.com/badges/qcubed-phonetextbox/health.svg)](https://phpackages.com/packages/qcubed-phonetextbox)
```

###  Alternatives

[propaganistas/laravel-phone

Adds phone number functionality to Laravel based on Google's libphonenumber API.

3.0k35.7M106](/packages/propaganistas-laravel-phone)[dniccum/phone-number

A Laravel Nova phone number field with input masking and validation support.

71432.7k](/packages/dniccum-phone-number)[laravel-validation-rules/phone

Validate that a phone number is in the correct format

69355.5k](/packages/laravel-validation-rules-phone)[stuyam/laravel-phone-validator

A phone validator for Laravel using the free Twilio phone lookup service.

2861.3k](/packages/stuyam-laravel-phone-validator)[laravel-validation-rules/us-state

Validate US States and Canada Provinces

16172.7k](/packages/laravel-validation-rules-us-state)[ipub/phone

Phone helper &amp; validator for Nette Framework

1285.3k6](/packages/ipub-phone)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
