Add validation on views bulk operations form I have a content type on which I added a custom validation that there can't be more than 7 items of that content type that is marked as 'sticky'.  That validation was added on the add and edit pages through omhm_mod_form_blog_node_form_alter(&amp;$form, &amp;$form_state, $form_id) with the line $form['#validate'][] = 'omhm_mod_form_nouvelle_node_form_validate'; and my custom validation omhm_mod_form_nouvelle_node_form_validate.

Now I have to make a page with views bulk operations with the same custom validation in place ... how can I do that ?

I'm trying to add the custom vbo validation views_bulk_operations_form_validate($form, &amp;$form_state) to my omhm_mod_views_bulk_operations_form_alter($form, &amp;$form_state, $form_id) hook with the line $form['select']['submit']['#validate'][] = 'omhm_mod_carrousel_views_bulk_operations_form_validate'; but nothing happens.
Your omhm_mod_views_bulk_operations_form_alter($form, &amp;$form_state, $form_id) takes $form by value, not by reference, so any changes made to $form are scoped to the function only. That's why $form['select']['submit']['#validate'][] changes nothing. It should be omhm_mod_views_bulk_operations_form_alter(&amp;$form, &amp;$form_state, $form_id) 

When you fix mistake I pointed above, and it will not help, be sure to test if your hook is run at all, and if it is, then test if your validator is. It'll be needed for your next question, if you will need to ask it.