I don't think that is probably illegal, but most savvy parents will shop around and get the items elsewhere.For example all the state schools in my area have a sweatshirt top , grey trousers / skirt, white shirt/blouse.The sweatshirts are red, green, navy,and black according to which ever school it is.
All the local supermarkets gear up at unifom time as do the market stalls to offer the items for sale.
Each school has a named supplier , but the parents in my area shop as mentioned earlier, thus saving loads of cash.
Blazers are optional as is a school tie.Makes good sense to me especially when there are a number of children in a family who all need kitting out at the same time.