Why is my validate function not receiving the value of my form element? function mymodule_email_reviewers_action_form($context) {
  $form = array();
    $form['email_text'] = array(
        '#type' =&gt; 'textarea', 
        '#name' =&gt; 'message'
    );
    $form['submit'] = array(
        '#name' =&gt; '',
        '#type' =&gt; 'submit',
        '#value' =&gt; 'Apply'
    );
  return $form;
}

function mymodule_email_reviewers_action_validate($form, $form_state) {
    $text = $form_state['values']['email_text'];
    dsm($form_state);
    dsm($text);
    dsm($form);
    if ($text == 'Email body' || empty($text)) {
        form_set_error('email_text', t('Please enter a message'));
    }
}


I'm not sure what might be wrong here. Neither the $form nor $form_state contain the text I enter into my textarea.
In the description for the "#name" attribute is reported the following text:


  INTERNAL, except for buttons. All button and submit elements on a form should have the same name, which is set to 'op' by default in Drupal. This does not apply to image buttons. For non-button elements, Drupal sets the name by using 'foo' in $form['foo'] as well as any parents of the element.


You should not set that attribute, which is considered internal.