Output JS code in validations_form_alter.

Ideally, think a way of letting users choose their own JS implementation - i.e. output a generic JS validation settings, then jQuery validate plugin could be used as well as any other piece of code.