Added validation hook on buttons