title: How to red highlight the control on drupal forms with, form set error. while control to validate is lying in #rows attribute of parent element?
body: <p>I am performing some valdation, i wrote a code for validation of child elements in an array which is child of a form element and is associated to it with #rows attributes, but i am unable to pick that particular control to highlight it to the end user, that here error lies? other wise i am using drupal set message, i just need to highlight the code. I am sharing code with you people. 
  THANKS FOR ANY ADVICE IN ADVANCE!</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>$form['patient_videos'] = array(
              '#prefix' =&gt; '&lt;div class="aa-patient-videos-container"&gt;',
             '#suffix' =&gt; '&lt;/div&gt;',
             '#tree' =&gt; TRUE,
             '#theme' =&gt; 'table',
             '#header' =&gt; array( t('Title'),
                                 t('Sent Date'),
                                 t('Status'),
                                 t('Customize'),
                                 t('Include'),
                                 t('Watched'),
                                 t('No. Times View'),
                                 t('No. Times Sent'),
                                 t('First Send'),
                                 t('Resend'),
  
                              ),
             '#rows' =&gt; array(),
  
             ###  do not put #name on the form fields
          );
  
  
  $form['patient_videos'][] = array(
                  'title'=&gt;&amp;$title,
                  'sent_date'=&gt;&amp;$sent_date,
                  'status'=&gt;&amp;$status,
                  'customize'=&gt;&amp;$customize,
                  'include'=&gt;&amp;$include,
                  'watched'=&gt;&amp;$watched,
                  'number_times_viewed'=&gt;&amp;$number_times_viewed,
                  'number_times_sent'=&gt;&amp;$number_times_sent,
                  'first_sent_date'=&gt;&amp;$first_sent_date,
                  'video_id'=&gt;&amp;$video_id,
              );
  
              $form['patient_videos']['#rows'][] = array(
                  array('data' =&gt; &amp;$title),
                  array('data' =&gt; &amp;$sent_date),
                  array('data' =&gt; &amp;$status),
                  array('data' =&gt; &amp;$customize),
                  array('data' =&gt; &amp;$include),
                  array('data' =&gt; &amp;$watched),
                  array('data' =&gt; &amp;$number_times_viewed),
                  array('data' =&gt; &amp;$number_times_sent),
                  array('data' =&gt; &amp;$first_sent_date),
                  array('data' =&gt; &amp;$video_id),
              );
  
  
  
  //USING LOOP TO ACCESS EACH ROW'S VALUES 
   foreach ($form_state['values']['patient_videos'] as $key =&gt; $value){
  .
  .
  .
  }
  
  form_set_error('$values][patient_videos][$key][email_schedule', t("You cannot enter bigger date from next video in  ").$g);</code></pre>
  </div>
  </div>
  </p>
  
  <p>how to pick each rows sent date control and highlight it if value is not true.d</p>