Unset required attribute with multiple submit buttons and multistep form I have a multistep form created with msnf for an content type.
I set multiple submit buttons that each one has its own submit callback, and also i want every single button with its validation callback :

function MYMODULE_form_alter(&amp;$form, &amp;$form_state, $form_id){
  switch ($form_id){
        case "my_form_id" :
          $form['actions']['submit_2'] = array(
                '#type' =&gt; 'submit',
                '#name' =&gt; 'button_name',
                '#value' =&gt; t('Name'),
                '#weight' =&gt; 6,
                '#submit' =&gt; array('node_form_submit'),
                '#validate' =&gt; 'MYMODULE_validate_2'

            );
            // Add submit callback (works fine!)
            array_unshift($form['actions']['submit_2']['#submit'], 'MYMODULE_form_submit_2');
            // rest of code ...
  }
} 


inside the validation callback i put this test code :

function MYMODULE_validate_2($form, &amp;$form_state){    
  dpr('test');
  exit; 
}


Here i have two problems :

1) this validation callback didn't triggered i don't know why ? (the system must show me a dump 'test' and then exit but nothing happen!)

2) I want to disable all the required fields only when i click on this submit_2 button.

I found sth in this post, but like i said the validation callback is not handled so i can't test the code inside that post.

Thanks in advance.

EDIT
 I was blind :p I must put the callback function inside an array() like this

'#validate' =&gt; array('MYMODULE_validate_2')


sometime i made stupid error :)

Now my problem is only the second one :


I want to disable all the required fields only when i click on this submit_2 button.
You can set the #limit_validation_errors property on your submit button to an empty array to bypass validation on all required elements.