No - the medieval era is a common setting for many fantasy narratives because of the prevalence of knights, court politics, and chivalry. However, there are many pieces of medieval fiction that do not feature fantasy.