title: how to use required on insert validator for yii2?
body: <p>Can anyone have a suggestion about how to use <code>"on" =&gt; "insert"</code> validation in <strong>yii2</strong>?
  I have used </p>
  
  <pre><code>array('field_name', 'required', 'on'=&gt;'insert')
  </code></pre>
  
  <p>in <strong>Yii1</strong> but in <strong>yii2</strong> it does not check if I set </p>
  
  <pre><code>['field_name', 'required', 'on'=&gt;'insert']
  </code></pre>
  
  <p>.
  What is the problem here can you please explain?
  Thanks in advance.</p>