namespace frontend\models;
use integready\extensions\phoneInput\PhoneInputValidator;
class Company extends Model
{
public $phone;
public function rules()
{
return [
[['phone'], 'string'],
[['phone'], PhoneInputValidator::class],
];
}
}
namespace frontend\models;
use integready\extensions\phoneInput\PhoneInputValidator;
class Company extends Model
{
public $phone;
public function rules()
{
return [
[['phone'], 'string'],
// [['phone'], PhoneInputValidator::className(), 'region' => 'UA'],
[['phone'], PhoneInputValidator::className(), 'region' => ['PL', 'UA']],
];
}
}
namespace frontend\models;
use integready\extensions\phoneInput\PhoneInputBehavior;
class Company extends Model
{
public $phone;
public function behaviors()
{
return [
'phoneInput' => PhoneInputBehavior::class,
];
}
}
namespace frontend\models;
use integready\extensions\phoneInput\PhoneInputBehavior;
class Company extends Model
{
public $phone;
public $countryCode;
public function behaviors()
{
return [
[
'class' => PhoneInputBehavior::class,
'countryCodeAttribute' => 'countryCode',
],
];
}
}
bash
$ php composer.phar
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.