Field Validation and Highlighting How can I get custom Form API validation to highlight a field the same way the failed #required validation does?  (See attached graphic)

Note Graphic: 

1) (Green Line) Company Name is empty.  '#required' Error is noted and field is highlighted red.

2) (Blue Line) Website is incorrect.  'Custom Validation' Error is noted, but field is NOT highlighted.

How can I automatically highlight the 'Website' field on validation fail and remove it upon success?

Currently using: form_set_error('', t('Your website address is incorrectly formatted.'));

See
As the first parameter to form_set_error(), pass the name of the field to be highlighted. If it's a nested structure, pass it with square brackets, like so:

form_set_error('[your][nested][field]', 'Your Error Message');


There's a convenience wrapper around this, form_error, which takes the element instead of the string, like so:

form_error($form['your_field'], 'Your Error Message');


Also see the docs to form_set_error() (d7).