Site with only mymodule and views (with dependences) enabled beside core modules.
If my validation function looks like this:
<?php
function mymodule_form_validate($form, &$form_state) {
// ...
form_set_error($element, $error);
// ...
}
?>
errors are set during ajax call even if the button in question has
<?php
'#limit_validation_errors'=> array(),
'#submit'=> array(),
?>
However, if I write it like this:
<?php
function mymodule_form_validate($form, &$form_state) {
$limit_validation_errors = $form_state['clicked_button']['#limit_validation_errors'];
// ...
form_set_error($element, $error, $limit_validation_errors);
// ...
}
?>
it works just as it's supposed to.
Am I doing something wrong, or is there a bug somewhere?