title: ModX FormIt: validation error and success at the same time
body: <p>I create my form in ModX with FormIt:</p>
  
  <pre><code>[[!FormIt?
      &amp;hooks=`email`
      &amp;emailTpl=`registerEmailTpl`
      &amp;emailSubject=`New Registration on Huayang English Website`
      &amp;emailTo=`toto@gmail.com`
      &amp;successMessage=`Your application has been successfully sent to Huayang.`
      &amp;emailFrom=`contact@studychineseinyunnan.com`
      &amp;emailFromName=`Huayang School`
      &amp;submitVar=`registerForm`
      &amp;validate=`given_name:required, 
          family_name:required, 
          birthday:required,
          gender:required,
          address:required,
          city:required,
          state:required,
          country:required,
          zip:required,
          email:required,
          phone:required,
          passport_number:required,
          place_of_issue:required,
          date_of_issue:required,
          expiration_date:required,
          campus:required,
          class_type:required` 
  ]]
  </code></pre>
  
  <p>The issue is that I always get a validation error, even if I input information for all required form inputs. The weird thing is that the form seems to validate: the success email is sent and the <code>[[!+fi.successMessage]]</code> is shown. But on the other hand, the <code>[[+fi.validation_error_message]]</code> is shown too and <code>[[!+fi.validation_error]]</code> equals to <code>1</code>. <code>[[+errors]]</code> is empty though as well as <code>[[!+fi.error]]</code> which is supposed to contain the validation errors..</p>
  
  <p>So, it seems the form is validating and not validating at the same time.</p>
  
  <p>How can I debug the form and find where the validation error comes from?</p>