yii2: validate() before link()
<p>docs says: The model with the foreign key will be saved into database without performing validation.</p>

<p>But if I want to use validation before</p>

<pre><code>$order-&gt;link('items', $item);
</code></pre>

<p>is enough?</p>

<pre><code>if ($order-&gt;validate() &amp;&amp; $item-&gt;validate())
{
    $order-&gt;link('items', $item);
} else {
//do something
}
</code></pre>

<p>Or there is other solution?</p>