def add_error(self, property_name, message):
    """Add an error for the given property."""
    if property_name not in self.errors:
      self.errors[property_name] = []
    self.errors[property_name].append(message)
Add an error for the given property.