Added validation hook