Support dynamic/per-model validators by allowing a function that returns a validator object.