Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

mongoose id validator

var mongoose = require('mongoose');
var isValid = mongoose.Types.ObjectId.isValid('5c0a7922c9d89830f4911426'); //true
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #mongoose #id #validator
ADD COMMENT
Topic
Name
3+2 =