Skip to main content
1 of 2
iStryker
  • 4.5k
  • 2
  • 24
  • 44

Yes, but I would change

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

to

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

and

function MYMODULE_form_validate_custom($form, &$form_state) {

to

function MYMODULE_user_registration_form_validate($form, &$form_state) {

Nothing wrong with your code, but this just keep with the Drupal naming convention ie search_form_validate, node_form_validate, etc

iStryker
  • 4.5k
  • 2
  • 24
  • 44