Such that symbol

I’m trying to make a self-checking slide in which students input set-builder notation. I can’t get the “such that” symbol | to appear, as the math-input turns it into absolute value. Latex for this seems to be \mid, but that isn’t working. Any advice?