I added a validation hook to a node creation form.
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.
i would like to do something like that:
if (form_did_not_fail_validation_before) { $form['#validate'][] = 'my_module_validation_hook'; }
in my hook_form_alter, so that validation hook is only called the first time.
I can’t find a way to check if the form already failed validation, any ideas?
Sponsored by SupremePR