mongoId static method

String? Function(String?) mongoId({
  1. String errorMessage = 'Please enter a valid MongoDB ObjectId',
})

Ensures the string is a valid MongoDB ObjectId.

Implementation

static String? Function(String?) mongoId({
  String errorMessage = 'Please enter a valid MongoDB ObjectId',
}) {
  return _build(errorMessage, (v) => v.isMongoId);
}