Required fields in form not validated
Here you have the framework for Form-handling:

function customregister_custom_form($form, &amp;$form_state){
  $form['first_name'] = array(
    '#title' =&gt; t('Vorname'),
    '#type' =&gt; 'textfield',
    '#default_value' =&gt; '0',
    '#required' =&gt; TRUE
  );
  $form['last_name'] = array(
    '#title' =&gt; t('Name'),
    '#type' =&gt; 'textfield',
    '#default_value' =&gt; '',
    '#required' =&gt; TRUE
  );
  $form ['submit'] = array (
    '#type' =&gt; 'submit',
    '#ajax' =&gt; array (
    'callback' =&gt; 'customregister_custom_form_callback',
      'wrapper' =&gt; 'customregister-custom-form'
    ),
    '#value' =&gt; t ( 'Lancer la simulation' ),
    '#weight' =&gt; 10000
  );
  return $form;
}

function customregister_custom_form_validate($form, &amp;$form_state) {

  if (! is_numeric ( $form_state['values']['first_name'] )) {
    form_set_error ( 'first_name', 'ERROR !' );
  }
  if (! is_numeric ( $form_state['values']['last_name'] )) {
    form_set_error ( 'last_name', 'ERROR !' );
  }
}

function customregister_custom_form_callback($form, &amp;$form_state) {
  drupal_set_message('custom_form_callback');
  //customregister_custom_form_submit($form, $form_state);
  $formular = drupal_get_form('customregister_custom_form');
  $formular = render($formular);
  return $formular;
}

function customregister_custom_form_submit($form, &amp;$form_state) {
  drupal_set_message('custom_form_submit');
}