I am using CActive form ajax submission and validation. In the ‘afterValidate’ event I am using the $.ajax function to submit the data. How can I focus to a field that has error on validation. We can set the ‘focus’ option as given here, but it will focus only on page load.