Added validation for links