I have a form which opens in a modal CTools window. The forms submits perfectly, but when I try to use the my_form_validate() function, it never goes to that function, it always go directly to my_form_submit() function? I have tried to "uncode" the CTools modal windows example provided with the module, but I am not able to decipher it.
I have just discovered that I had mistyped mymodule_my_form_validate as my_module_my_form_validate. Your reply has made me look into the function and now it works perfectly. Somehow I thought the method was much more convoluted as involved AJAX. Sorry, this is very embarrasing. In any case, your reply saved me a lot of time.