validate and tip