If the parts of wudhu that needed to be washed and wiped were not najis and the najasat was somewhere else then the wudhu was valid. If one realized the najasat after salat then salat is valid. If one knew najasat was present but forgot then remembered they need to repeat the salat.