code: public static void validate(String styleAttribute) throws InvalidInputException {
      try {
        final Map<String, String> styleMap = Splitter.on(";").omitEmptyStrings().withKeyValueSeparator(":").split(styleAttribute);
        final HashSet<String> inputStyleProperties = new HashSet<>(styleMap.keySet());
        inputStyleProperties.removeAll(ALLOWED_PROPERTIES);
        if (!inputStyleProperties.isEmpty()) {
          throw new InvalidInputException("Invalid property(s): [" + Joiner.on(",").join(inputStyleProperties) + "] in the \"style\" attribute");
        }
      } catch (IllegalArgumentException ex) {
        throw new InvalidInputException("Unparseable \"style\" attribute: " + styleAttribute, ex);
      }
    }
docs: Validate that the input style attribute is allowed
  
  @param styleAttribute input style string
  @throws InvalidInputException if the styleAttribute is allowed