indicalabs / yii2-phone
International telephone validator
Installs: 210
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
Type:yii2-extension
Requires
- npm-asset/intl-tel-input: 17.0.12
- yiisoft/yii2: 2.0.49
This package is auto-updated.
Last update: 2025-01-05 15:40:53 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', ] ]); ?>```