Actually I'm working on ajax validation in Yii 2
. I am sending two public variables data into a column in DB. while loading a post values. How to validate custom onto that field.
My Code:
public $prefix;
public $mobile;
$model->phone = Yii::$app->request->post('prefix') . '' . Yii::$app->request->post('mobile');
and I want this
['phone, 'unique']
Thanks in advance