How to Validate an array size
<p>I have one parameter called tags I am getting that parameter in tags[1,2,3,4,5] format now I need to validate that thing to only 4 values allow in tags parameter.</p>

<p>How can i do that ?</p>

<p>I tried various methods but not succeed.</p>

<pre><code>$rules = array(
    'ids'  =&gt; 'required',
    'note' =&gt; 'required|array|min:3',
    'tags' =&gt; 'required|array|max:4',           
);
</code></pre>

<p>I am not able validating that thing properly.</p>

<p>I am not even allow 4 parameters to be entered.</p>