mikk150 / yii2-phone-validator
yii2 phonenumber validator
Installs: 10 629
Dependents: 1
Suggesters: 0
Security: 0
Stars: 5
Watchers: 1
Forks: 2
Open Issues: 0
Type:yii2-extension
Requires
- bower-asset/google-libphonenumber: ~3.0|~2.0
- giggsey/libphonenumber-for-php: ~8.3
- yiisoft/yii2: ~2.0
Requires (Dev)
- codeception/codeception: ^3.1.3 | ^4.0 | ^5.0
- codeception/module-asserts: ^1.0 | ^2.0 | ^3.0
- codeception/module-webdriver: ^1.0 | ^2.0 | ^3.0 | ^4.0
- credy/phpbuiltinserver: dev-master
This package is auto-updated.
Last update: 2024-12-03 12:18:57 UTC
README
This extension validates phone numbers
It will also format phone number to ITU-T E.164 or any other format that LibPhoneNumber supports(for full support see libphonenumber\PhoneNumberFormat)
Usage
// add this in your model use mikk150\phonevalidator\PhoneNumberValidator; // use the validator in your model rules public function rules() { return [ [['phone'], PhoneNumberValidator::className(), 'country' => 'US'] ]; }