you might want to use validateAction() function?