Mandatory field validation


I have 10 filters in my dashboard and out of that I want to make couple of filters as mandatory so that I can override “Refresh Visual” click event and return false if any of the mandatory fields are not selected by user. Can someone please suggest how to implement this?