['period_id', 'required', 'when' => function($model) {
return $model->operation_type == Listing::OPERATION_TYPE_RENT;
}, 'whenClient' => "function (attribute, value) {
return $('.listing-operation-type input:checked').val() == " . Listing::OPERATION_TYPE_RENT . ";
}"],