Is it possible to add some kind of JavaScript validation to ECB items like Edit Item, Check Out and Workflows? What I want is a simple JavaScript alert and redirect to the list if the clicked item does not pass the validation, on the other hand the user will be redirected to the specific page if the item passed the validation (ie Workflow.aspx if the user clicked on Workflows). Overriding functions like AddCheckinCheckoutMenuItem from core.js in an content editor webpart didn't work for me (is it even possible?). I also dont't want to create a whole new ECB, that's why I don't want to use Custom_AddDocLibMenuItems and return false.
What I want in pseudo-code in the ECB onclick for non-custom items:
if(condition)
JS alert;
redirect back to list;
else
normal behavior;