public function rules()
{
return [
....
[['dateEnd'], 'dateValidate'],
];
}
public function dateValidate($attribute, $params)
{
$model=Model_1::findOne(id);
if($this->dateEnd<=$model->dateStart){
$this->addError('dateEnd', 'Ошибка');
}
}