I have a form, with multiple (ajax) components. I have added a simple button in the middle of this form, to validate custom fields.
$form['fieldset_2']['forward'] = array(
'#type' => 'button',
'#value' => t('Forward'),
'#name' => 'btn_forward',
);
As expected, button call'scall validation function in which iI check if all values are correct.
The validation messages are not rendered immediately. iI have to refresh page to get the error messages. The button doesntdoesn't use ajax.
I have a field type radios and form_set_error doesn't color the element with red or something.
thanks for advice!