As long as you have 3 defenders, 1 attacker, everyone is in their correct position and at least one player on each wing then it's not 'illegal', and will, more often than not win the game if the team has a higher rating than the opponent.
I use a lot of 'unorthodox' formations like that, keeps the game interesting!