Added validate hook