$ curl cheat.sh/
# syntax - while variable is not equal to x or y bash
# 
# != does not distribute over ||, which joins two complete expressions.
# Once that is fixed, you'll need to use && instead of || as well.

while [[ "$UserChoice" != "1" && "$UserChoice" != "2" ]]

# Actually, bash does support pattern matching which can be used
# similarly to what you had in mind.

while [[ $UserChoice != [12] ]]

# With the extglob option set (which is on by default inside [[ ... ]]
# starting in bash 4.2, I believe), you can use something very close to
# what you originally had:

while [[ $UserChoice != @(1|2) ]]

# [chepner] [so/q/25877637] [cc by-sa 3.0]

$
Follow @igor_chubin cheat.sh