indicalabs / yii2-phone
International telephone validator
Package info
github.com/indicalabs/yii2-phone
Type:yii2-extension
pkg:composer/indicalabs/yii2-phone
dev-master / 1.0.x-dev
2023-09-05 12:53 UTC
Requires
- npm-asset/intl-tel-input: 17.0.12
- yiisoft/yii2: 2.0.49
This package is auto-updated.
Last update: 2026-03-05 18:16:55 UTC
README
International telephone validator
Installation
The preferred way to install this extension is through composer.
Either run
php composer.phar require --prefer-dist indicalabs/yii2-phone "*"
or add
"indicalabs/yii2-phone": "*"
to the require section of your composer.json file.
Usage
Once the extension is installed, simply use it in your code by :
<?= $form->field($model, 'mobile_number')->widget(indicalabs\phone\IntlTelWidget::className(),[ 'clientOptions' => [ 'initialCountry' => 'us', ] ]); ?>```