form_set_error checkbox CCK 2 drupal 6 How can I highlight the checkbox boxes when be validated a CCK field? (CCK 2.9). Data is validated correctly, and message is displayed correctly in the head of the form, but the checkboxes does not appear highlighted.

&lt;?php    
$quantity_options = count($form_state['values']['field_checkboxes']);
if ($quantity_options &gt; 2) {
form_set_error('field_checkboxes', 'message.');
}
?&gt;
Have a look if the class error has been added to your &lt;input&gt;. It has on my side, it's the CSS that does not highlight the elements properly.

You can either adjust your stylesheet for .form-item input.error or you can use a piece of jQuery to make the parent of the radios styleable, such as 

$('.form-radios:not(.error):has(.form-item input.error)').addClass('error');


Another option would be to add the appropriate class via the Drupal's theming system (theme_optionwidgets_buttons()).