2017 © Pedro Peláez
 

qcubed-library phonetextbox

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

image

qcubed/phonetextbox

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

  • Tuesday, May 23, 2017
  • by qcubed
  • Repository
  • 5 Watchers
  • 0 Stars
  • 15 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

PhoneTextBox and qcubed.phonetextbox.js

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., (*1)

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., (*2)

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., (*3)

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., (*4)

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

    composer require qcubed/phonetextbox

qcubed.phonetextbox.js

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., (*6)

The Versions

23/05 2017

dev-master

9999999-dev

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

  Sources   Download

MIT

The Requires

  • php >=5.3

 

phone qcubed

23/05 2017

v4.0.1-alpha

4.0.1.0-alpha

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

  Sources   Download

MIT

The Requires

  • php >=5.3

 

phone qcubed