How to validate input data that are previously saved? I am creating a module that can store user input in db and populate in a listing page with validation. I am collecting all values before submit i.e. any change in any field I store the form state in database, next I need to validate it on a listing page which will validate those input and give the error.

I have tried node_validate_form &amp; drupal_validate_form but it's not working.

I think drupal_validate_form will do what I want but it omit default field validation like required validation or email validation are not validating properly and also in listing page it only validate the 1st one after that it is not checking any validation.

$header = array(
    array('data' =&gt; t('Field')),
    array('data' =&gt; t('Error')),
  );
  $rows = array();
  $owner = '';
  $result = db_select('MY_MODULE', 'lt')
    -&gt;fields('lt', array('owner', 'form_state', 'form_state_input'))
    -&gt;condition('lid', $lid)
    -&gt;range(0,1)
    -&gt;execute();

  if (!$result) {
    $rows[] = array(array('data' =&gt; t('No Result found.'), 'colspan' =&gt; 10));
  }
  else {
    $old_msg = drupal_get_messages();
    $_SESSION['messages'] = array();
    $node_form = (object) array(
      'type' =&gt; 'MY_CONTENT_TYPE',
      'language' =&gt; LANGUAGE_NONE,
    );
    $form = drupal_get_form('MY_CONTENT_TYPE_node_form',$node_form);
    $form['#submit'] = array('#type' =&gt; 'submit', '#value' =&gt; t('Next'));
    foreach($result as $r){
        $owner = l(t(user_load($r-&gt;owner)-&gt;name), 'user/'.$r-&gt;owner);
        $old_fs = @unserialize($r-&gt;form_state);
        $form_state_input = @unserialize($r-&gt;form_state_input);
        $old_fs['values']['uid'] = $user-&gt;uid;
        $form_state = array();
        $form_state['values'] = array_merge($old_fs['values'],$form_state_input);
        $form_state['values']['op'] = t('Save');
        $form_state['submitted'] = 1;
        $form_state['complete form'] = array();
        $form_state['rebuild'] = TRUE;
        $form_state['triggering_element'] = array('#parents'=&gt;array('next'),'#button_type'=&gt;'submit');
        unset($form['#token']);
        drupal_validate_form('MY_CONTENT_TYPE_node_form', $form, $form_state);
        $errors = form_get_errors();
        $noOfError = 'empty';
        if (!empty($errors)) {
          $noOfError = count($errors);
          foreach($errors as $field =&gt; $error){
            $field_name = explode(']',$field,2);
            $info = field_info_instance('node',$field_name[0],'MY_CONTENT_TYPE');
            $rows[] = array(
                    array('data' =&gt; $info['label']),
                    array('data' =&gt; $error),
                  );
          }
        }
        else{
          $rows[] = array(array('data' =&gt; t('No Error found.'), 'colspan' =&gt; 10));
        }
        form_clear_error();
    }
    $_SESSION['messages'] = $old_msg;
  }
  $build = array(
    '#theme' =&gt; 'table',
    '#header' =&gt; $header,
    '#rows' =&gt; $rows,
    '#attributes' =&gt; array('id' =&gt; 'MY_MODULE'),
  );


Thank You In Advance....:)
oh..

drupal submit  form hook does the magic