No, it's not illegal. 3 defenders, at least 1 wing player, 3 midfielders and 2 strikers, it's perfectly ok.