Skip to main content
added 38 characters in body
Source Link

Use hook_form_alter()hook_form_alter() to change the $form['#validate'] to be your custom validate handler.

function custom_module_form_alter(&$form, &$form_state, $form_id) {
  if ($form_id == 'your_form_id') {
   $form['#validate'] = array();
   $form['#validate'][] = 'my_custom_validation'; 
  }
}

Use hook_form_alter() to change the $form['#validate'] to be your custom validate handler.

function custom_module_form_alter(&$form, &$form_state, $form_id) {
  if ($form_id == 'your_form_id') {
   $form['#validate'] = array();
   $form['#validate'][] = 'my_custom_validation'; 
  }
}

Use hook_form_alter() to change the $form['#validate'] to be your custom validate handler.

function custom_module_form_alter(&$form, &$form_state, $form_id) {
  if ($form_id == 'your_form_id') {
   $form['#validate'] = array();
   $form['#validate'][] = 'my_custom_validation'; 
  }
}
added 38 characters in body
Source Link

Use hook_form_alter() to change the $form['#validate'] to be your custom validate handler.

function custom_module_form_alter(&$form, &$form_state, $form_id) {
  if ($form_id == 'your_form_id') {
   $form['#validate'] = array();
   $form['#validate'][] = 'my_custom_validation'; 
  }
}

Use hook_form_alter() to change the $form['#validate'] to be your custom validate handler.

function custom_module_form_alter(&$form, &$form_state, $form_id) {
  if ($form_id == 'your_form_id') {
   $form['#validate'][] = 'my_custom_validation'; 
  }
}

Use hook_form_alter() to change the $form['#validate'] to be your custom validate handler.

function custom_module_form_alter(&$form, &$form_state, $form_id) {
  if ($form_id == 'your_form_id') {
   $form['#validate'] = array();
   $form['#validate'][] = 'my_custom_validation'; 
  }
}
This will override the default validation,to execute custom module first changed the module weight
Source Link
J. Reynolds
  • 6.4k
  • 2
  • 17
  • 28

Use hook_form_alter() to change the $form['#validate'] to be your custom validate handler.

function custom_module_form_alter(&$form, &$form_state, $form_id) {
  if ($form_id == 'your_form_id') {
   $form['#validate']$form['#validate'][] = array('my_custom_validation');'my_custom_validation'; 
  }
}

Use hook_form_alter() to change the $form['#validate'] to be your custom validate handler.

function custom_module_form_alter(&$form, &$form_state, $form_id) {
  if ($form_id == 'your_form_id') {
   $form['#validate'] = array('my_custom_validation'); 
  }
}

Use hook_form_alter() to change the $form['#validate'] to be your custom validate handler.

function custom_module_form_alter(&$form, &$form_state, $form_id) {
  if ($form_id == 'your_form_id') {
   $form['#validate'][] = 'my_custom_validation'; 
  }
}
This will override the default validation,to execute custom module first changed the module weight
Source Link
Loading
improve formating
Source Link
Adeel Nawaz
  • 3.2k
  • 1
  • 16
  • 24
Loading
Source Link
Loading