There is a large variety of pupil shapes and ability to contract pupils in animals. The vast majority of animals can contract their pupils, including goats and mongooses. Prey animals tend to have horizontally slit pupil, like goats. Mongooses (carnivores) seem to be an exception in that respect. Here is a picture of a sheep's pupil fully dilated and fully contracted:
As you are particularly interested in mongooses, the paper "Characteristics of the eye of the Indian mongoose (Herpestes auropunctatus)" reports the following concerning pupils dilation induced by topical application of pilocarpine: "The dilated pupil is approximately 3.80 mm in diameter and slightly oval, the long axis being horizontal. [...] The constricted pupil is teardrop-shaped, with horizontal and vertical dimensions of 2.5 and 1.1 mm, respectively, the narrow end of the aperture being the nasal end." However that shape seems specific to Indian mongooses because if you search for images of mongooses you'll see that most of them have oblong pupils when contracted. But all of them seem to have almost circular pupils when dilated. Here you can compare the pupil of a mongoose during the day (strongly contracted) and at night (mostly dilated, the color comes from the night photograph):
Nellis, D. W., Sivak, J. G., McFarland, W. N., & Howland, H. C. (1989). Characteristics of the eye of the Indian mongoose (Herpestes auropunctatus). Canadian journal of zoology, 67(11), 2814-2820.