title: Laravel validator for nested array
body: <p>Am using the Laravel Validator class to do some basic validation on an array.</p>
  
  <p>My array :</p>
  
  <pre><code>$employee['name']='name';
  $employee['address']='address';
  $employee['department']['name']='deptname';
  $employee['department']['address']='deptaddress';
  </code></pre>
  
  <p>I have the validation rules as below:</p>
  
  <pre><code>$rules = array(
      'name'=&gt; 'required',
      'address' =&gt; 'required'
  )
  </code></pre>
  
  <p>And the custom messages as below :</p>
  
  <pre><code>$messages = array(
       'name.required' =&gt; 'Employee Name is required',
       'address.required' =&gt; 'Address is required'
  )
  </code></pre>
  
  <p>I will use <code>Validator::make($employee, $rules, $messages);</code></p>
  
  <p>How do I write the rule and messages for <code>$employee[department]['name']</code> and <code>$employee[department]['address']</code> using same rules and messages variables?</p>