I am using Micronaut framework with JAVA and trying to validate the objectId with the below string.
60236833af6a1d49478d2bef // Valid mongo ObjectId
60236833a46a1d49478d2bef // Invalid mongo ObjectId
How can I perform either the string has valid objectId or not in Java with MongoDb?