Added example client side hook for validation