On click event actions are fired even if there are validation messages
I have a local action diaplyed as overlay with a customized button in the pyOverlayTemplate. I have an event on click of button performing different actions. In the first action i have refresh section with an activity to set some validation messages and the second action to close the overlay modal window.
Even if i have error messages in the first action, the second action is performed i.e the modal window is closed. How can i avoid the second/third acions to be performed if i have validation messages on the page. Any ideas?