Looks like a good start. In theory, I think it would work on any field. It doesn't make much sense with some of them (e.g. properties), but I don't think anyone would try to use those anyway.
The only issue is that no constraint value could have a regular comma in it. I'd suggest using || as a delimiter, which is much less likely to end up in a Resource field.
A slightly different way to go would be to just explode all of them, whether they contain a delimiter or not. If there are no delimiters, the array will only have one member, but in_array() will still work.
I'd also suggest using the strict comparison version of in_array():
if (!in_array($obj->get($constraintField), $constraintValues), true)
The loose version of in_array() can produce some very wacky results:
http://www.php.net/manual/en/function.in-array.php#106319