added validation to make sure title and link fields are not empty