Just an aside, if a child is dairy allergic, they can still have breastmilk. Mum is not a cow and doesn't live in a dairy. Some children may react to fragments of dairy proteins in breastmilk and their Mum may have to go dairy free if she wishes to continue breastfeeding. If she can't do this, then allergy free formula is the only other choice but we don't have very much long term safety information about these products, they are life saving in the short term but from the little evidence I have so far seen, the outcomes in terms of child health are worse than with normal cowsmilk based formula which in turn are worse than with breastmilk. Meaning for a child with dairy allergy, accurate information about the risks of not breastfeeding is even more vital.
There are children with conditions that mean they cannot have breastmilk at all, galactosemia is one of them but these conditions are much rarer than dairy allergies.