Great extension but I have difficult time to follow your example to make it work for my use case
In your code example, you have 'phone_number', 'phone', and 'phoneInput' . They are confusing as there is little explanation on what they do.
My use case is I have 'primary_phone' and 'secondary_phone', after trial and error I got it working with the following
/** Model **/
use borales\extensions\phoneInput\PhoneInputValidator;
class Student extends ActiveRecord
{
public $phone; // must declare other this extension wont work
public function behaviors()
{
return [
PhoneInputBehavior::className(),
];
}
public function rules()
{
return [
[['primary_phone', 'secondary_phone'], 'string', 'max' => 255],
[['primary_phone', 'secondary_phone'], PhoneInputValidator::className()],
}
}
Great extension but I have difficult time to follow your example to make it work for my use case
In your code example, you have 'phone_number', 'phone', and 'phoneInput' . They are confusing as there is little explanation on what they do.
My use case is I have 'primary_phone' and 'secondary_phone', after trial and error I got it working with the following