Binding yiiActiveForm jquery plugin events?

I’ve already tried different approaches but still can’t make it to work.

What’s your solution?


<?php

$js = <<<JAVASCRIPT

jQuery('#{$form->getId()}').on("beforeValidate", function(event, messages, deferreds) {

	alert('This alert wants to show up. Desperately.');

});

JAVASCRIPT;

$this->registerJs($js);

Okay, everything works fine. I should use "beforeValidateAttribute" event in my particular situation.