User registration form validate and submit hooks not called I try to add custom validation or submit function to the user registration form, but nothing works.

Here is the code in /sites/all/themes/mytheme/template.php:

function mytheme_user_register_form_validate (&amp;$form, &amp;$form_state) {}
function mytheme_form_user_register_form_validate (&amp;$form, &amp;$form_state) {}
function mytheme_user_register_validate (&amp;$form, &amp;$form_state) {}
function mytheme_user_register_form_submit (&amp;$form, &amp;$form_state) {}
function mytheme_profile_user_form_validate (&amp;$form, &amp;$form_state) {}


I also put similar code to /sites/all/modules/custom/mymodule/mymodule.module:

function mymodule_user_register_form_validate (&amp;$form, &amp;$form_state) {}
function mymodule_form_user_register_form_validate (&amp;$form, &amp;$form_state) {}
function mymodule_user_register_validate (&amp;$form, &amp;$form_state) {}
function mymodule_user_register_form_submit (&amp;$form, &amp;$form_state) {}
function mymodule_profile_user_form_validate (&amp;$form, &amp;$form_state) {}


None of the above functions are called and I have ran out of ideas.
As a proof that something works on this form, here is something that does work:

function mytheme_form_user_register_form_alter(&amp;$form, &amp;$form_state, $form_id) {}


This gets called!! But I need to validate...

By the way, the debugger shows (among other) this when debugging the hook_form_alter:

$form['#validate'][0] = 'user_account_form_validate'
$form['#validate'][1] = 'user_validate_picture'
$form['#validate'][2] = 'user_register_validate'
$form['#validate'][3] = 'profile_user_form_validate'
Add this in your hook_form_alter:

$form['#validate'][] = 'your_validation_function';

This way you can define an additional validation functions. Make sure you report all validation errors using the form_set_error() function.