emleons/tz_namba
Composer 安装命令:
composer require emleons/tz_namba
包简介
Simple php class to validate Tanzania phone numbers by cheking if it is well formated
README 文档
README
This is a simple PHP library for validating Tanzania phone numbers. It uses check if a given phone number is well formated. by default it accepts the following formats: +255956413291 255696413291 0656913291 you can modify it per your needs by editing the file from src/ValidateNamba.php
Installation
To use this library, you need to have Composer installed in your system. Once you have Composer installed, you can download the library by running the following command:
composer require emleons/tz_namba
Usage
Here is an example of how to use it:
require('vendor/autoload.php'); use Emleons\TzNamba\ValidateNamba; $test = new ValidateNamba; $phone = "+255752123456"; // Replace with the phone number you want to validate if($test->validate($phone)){ echo $phone." is a valid phone".'<br>'; }else{ echo $phone." is an invalid phone".'<br>'; } //sometimes you may want to remove prefix from phone numbers to do it use the remove_tz_prefix() method and pass your phone that follows accepted format $removed_prefix = $test->remove_tz_prefix($phone); echo "Removed prefix from ".$phone." to ".$removed_prefix;
Contributions
If you find a bug or have a feature request, please open an issue or submit a pull request.
Credits
Developed by Emleons email:emleons23@gmail.com
emleons/tz_namba 适用场景与选型建议
emleons/tz_namba 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 19 次下载、GitHub Stars 达 1, 最近一次更新时间为 2023 年 06 月 23 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 emleons/tz_namba 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 emleons/tz_namba 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 19
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 19
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2023-06-23