This general constraint uses a function taking an actual value and an expected value to do the match.