Download the PHP package dammynex/ngr-phone-validator without Composer
On this page you can find all versions of the php package dammynex/ngr-phone-validator. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download dammynex/ngr-phone-validator
More information about dammynex/ngr-phone-validator
Files in dammynex/ngr-phone-validator
Download dammynex/ngr-phone-validator
More information about dammynex/ngr-phone-validator
Files in dammynex/ngr-phone-validator
Vendor dammynex
Package ngr-phone-validator
Short Description A PHP Libary to validate a nigerian phone number based on availabe public data
License Apache-2.0
Package ngr-phone-validator
Short Description A PHP Libary to validate a nigerian phone number based on availabe public data
License Apache-2.0
Please rate this library. Is it a good library?
Informations about the package ngr-phone-validator
ngr-phone-validator
A PHP Libary to validate a nigerian phone number based on availabe public data.
It utilizes some very common data to check if a Nigerian phone number is valid.
It's very easy to setup and use.
Using composer
Manually Download the zip package and require it
Validating a phone number without exceptions
Validating a phone number using exceptions
When returns true, Other methods can be utilized.
| Method | Description |
|---|---|
| __toString() | Returns the phone number |
| getInternationalFormat() | Returns the international format of the specified phone number (eg. +2349061668519) |
| getInternationalFormatWithoutPlusPrefix() | Returns the international format with the plus sign (eg. 2349061668519) |
| getLength() | Returns the length of the phone number |
| getLocalFormat() | Returns the local format of specified phone number (eg. 09061668519) |
| getNetwork() | Returns the phone number's network |
| getPhoneNumber() | Returns the raw (unedited) specified phone number |
| getThrowExceptions() | Returns whether validator is assigned to throw exceptions |
| isOfLength(int $length) | Returns whether length of phone number matches a valid phone number length from the class |
| isNetwork(string $network) | Returns whether the phone number's network matches the specified . should be one from |
| isValid() | Returns whether phone number is valid |
| isValidLength() | Return whether phone's length is parsed and valid |
| setPhoneNumber(string $phone) | Assign phone number to validator |
| setThrowExceptions() | Assign whether exceptions should be thrown |
| toJson() | Return phone number's data in json string |
| validate() | Initialize validation for the phone number |
- [x] Supports Major Networks
Todo: Support other networks
- [ ] Smile
- [ ] Ntel
- [ ] Spectranet
Feel free to contribute!!!
All versions of ngr-phone-validator with dependencies
PHP Build Version
Package Version
No informations.
The package dammynex/ngr-phone-validator contains the following files
Loading the files please wait ...