mongoId function
mongo_id: the value must be a BSON ObjectId, 24 hexadecimal digits. The
output is the value as a string.
Implementation
LivrRule mongoId(List<Object?> args, RuleContext context) {
if (args.isNotEmpty) {
throw const LivrSchemaException('Rule [mongo_id] takes no arguments');
}
return _mongoId;
}