Ah yes I left some logic from Yii there, I see now thanks.

I am still sceptical about using $ne so I think the best thing is to try and to match on a positive exact/regex match and then do client side validation for the primarykey, negation operators are not very nice things most of the time.