docs: def _validated(self, value):
          """Format the value or raise a :exc:`ValidationError` if an error occurs."""
          if value is None:
              return None
          if isinstance(value, bson.ObjectId):
              return value
          try:
              return bson.ObjectId(value)
          except (ValueError, AttributeError):
              self.fail('invalid_object_id')