A mongoose middleware for node-validator.