That's ripped directly from `mongoose-validator` - which I've removed because it screws up the ability to do async validations and looks rather poorly maintained.