This regex will be checked on every POST request, so I wanted something lightweight as looping over an array of regexes seems to be two times slower (in my naive tests).

Also, that regular expression isn't too bad (imho) and it keeps the code nice and tidy.