Download the PHP package udokmeci/yii2-phone-validator without Composer
On this page you can find all versions of the php package udokmeci/yii2-phone-validator. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download udokmeci/yii2-phone-validator
More information about udokmeci/yii2-phone-validator
Files in udokmeci/yii2-phone-validator
Download udokmeci/yii2-phone-validator
More information about udokmeci/yii2-phone-validator
Files in udokmeci/yii2-phone-validator
Vendor udokmeci
Package yii2-phone-validator
Short Description Modern Yii2 Phone validator wrapper on top of PhoneNumberUtil library also used by Android devices
License MIT
Homepage https://github.com/udokmeci/yii2-phone-validator
Package yii2-phone-validator
Short Description Modern Yii2 Phone validator wrapper on top of PhoneNumberUtil library also used by Android devices
License MIT
Homepage https://github.com/udokmeci/yii2-phone-validator
Please rate this library. Is it a good library?
Informations about the package yii2-phone-validator
Yii2 Phone Validator
Yii2 phone number validator extension using Google's libphonenumber library.
Installation
Usage
Basic Validation
Using Format Enum
Dynamic Country Detection
Custom Formatting
Configuration
| Property | Description | Default |
|---|---|---|
country |
Fixed country code (ISO 3166-1 alpha-2) | null |
countryAttribute |
Model attribute containing country code | null |
strict |
Require country for validation | true |
format |
Output format | INTERNATIONAL |
Format Options
| Format | Example Output |
|---|---|
PhoneNumberFormat::E164 |
+31612345678 |
PhoneNumberFormat::INTERNATIONAL |
+31 6 12345678 |
PhoneNumberFormat::NATIONAL |
06 12345678 |
PhoneNumberFormat::RFC3966 |
tel:+31-6-12345678 |
false |
No formatting |
Note: PhoneNumberFormat is a modern PHP 8.1+ enum. Import: use udokmeci\yii2PhoneValidator\PhoneNumberFormat;
Examples
Netherlands Phone
US Phone
Non-Strict Mode
Requirements
- PHP 8.1+
- Yii2 2.0.40+
- giggsey/libphonenumber-for-php ^8.13
Testing
Follow Yii2 Extension Testing Guidelines:
License
MIT License. See LICENSE file.
All versions of yii2-phone-validator with dependencies
PHP Build Version
Package Version
Requires
php Version
>=8.1.0
yiisoft/yii2 Version ^2.0.40
giggsey/libphonenumber-for-php Version ^8.13
yiisoft/yii2 Version ^2.0.40
giggsey/libphonenumber-for-php Version ^8.13
The package udokmeci/yii2-phone-validator contains the following files
Loading the files please wait ...