Skip to content

Instantly share code, notes, and snippets.

@switzer
Created January 11, 2013 04:07
Show Gist options
  • Save switzer/4507891 to your computer and use it in GitHub Desktop.
Save switzer/4507891 to your computer and use it in GitHub Desktop.
orgSchema.path('timezone').validate(function(value) {
Timezone.findOne({_id: value}, "_id", function (err, timezone) { return false; });
}, "Please provide a valid timezone");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment