GoLang MongoId::isValid

request it (288)
GoLang replacement for PHP's MongoId::isValid [edit | history]

Do you know a GoLang replacement for PHP's MongoId::isValid? Write it!

PHP MongoId::isValid

PHP original manual for MongoId::isValid [ show | php.net ]


(PECL mongo >= 1.5.0)

MongoId::isValidCheck if a value is a valid ObjectId


public static bool MongoId::isValid ( mixed $value )

This method may be used to check a variable before passing it as an argument to MongoId::__construct().



The value to check for validity.

Return Values

Returns TRUE if value is a MongoId instance or a string consisting of exactly 24 hexadecimal characters; otherwise, FALSE is returned.