title: Yii2: validation rule for array?
body: <p>I can define a rule for a single integer like this:</p>
  
  <pre><code>[['x'], 'integer']
  </code></pre>
  
  <p>Is it possible to tell that x is an integer array? For example:</p>
  
  <pre><code>[['x'], 'integer[]']
  </code></pre>
  
  <p>And could I specify the valid values in the array?</p>
  
  <p><strong>Update</strong>: From Yii version 2.0.4 we've got some help. See <a href="https://stackoverflow.com/questions/27252934/yii2-validation-rule-for-array/30300977#30300977">this answer</a>.</p>