定制 qcubed/plugin_phonetextbox 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

qcubed/plugin_phonetextbox

最新稳定版本:v1.0.1

Composer 安装命令:

composer require qcubed/plugin_phonetextbox

包简介

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

README 文档

README

QPhoneTextBox

QPhoneTextBox is a simple extension of the QTextBox 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.

QPhoneTextBox 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/plugin_phonetextbox

jquery.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.

统计信息

  • 总下载量: 98
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 2
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 8
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-07-31