A fluid container, such as an intravenous (IV) bag, including a fluid sensor for analyzing, identifying, and verifying a fluid is provided. The container includes an at least partially enclosed body defining an interior volume and one or more ports having an opening for accessing a fluid in the interior. A sensor device may be attachable to one of the ports. The sensor device includes a sensor for measuring a parameter of the fluid. A channel may extend between the port and the sensor for providing fluid from the interior volume of the body to the sensor. The sensor may be connected to a processing apparatus, such as a computer, for determining at least the type of fluid present based on the measured parameter obtained with the sensor. A method for analyzing, identifying, and verifying a fluid contained in a fluid container, such as an IV bag, is also provided.