Added hook to validate links