Check if form failed validation
<p>I added a validation hook to a node creation form.</p>

<p>For my project, i need this validation only ONE time: basically i just check if a value already exists in the DB and i notify it to the user. If the user still submits the form, i must add it anyway.</p>

<p>i would like to do something like that:</p>

<pre><code>if (form_did_not_fail_validation_before) {
  $form['#validate'][] = 'my_module_validation_hook';
}
</code></pre>

<p>in my hook_form_alter, so that validation hook is only called the first time.</p>

<p>I can't find a way to check if the form already failed validation, any ideas?</p>