Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

js validate mongodb id

//Validate MongoDB ID
const oid = 'abcd56789012345678901234'
return oid.length === 24 &&  !isNaN(Number('0x' + oid))
 
PREVIOUS NEXT
Tagged: #js #validate #mongodb #id
ADD COMMENT
Topic
Name
8+8 =