public class ColorStyleValidator extends Object implements ParameterValidator
This class was originally very strict and would only allow valid CSS2 color values. However, due to CONF-10001 this restriction is currently relaxed. It would be nice to reinstate that strictness at some later date.
| Modifier and Type | Field and Description |
|---|---|
static Pattern |
HEX_LONG_COLOR_MATCH |
static Pattern |
HEX_SHORT_COLOR_PATTERN |
static Pattern |
NAMED_COLOR_PATTERN |
static Pattern |
PERC_COLOR_PATTERN |
static Pattern |
RGB_COLOR_PATTERN |
| Modifier and Type | Method and Description |
|---|---|
void |
assertValid(String propertyValue)
Throws a MacroParameterValidationException if the property value is invalid.
|
static ColorStyleValidator |
getInstance() |
public static final Pattern NAMED_COLOR_PATTERN
public static final Pattern HEX_SHORT_COLOR_PATTERN
public static final Pattern HEX_LONG_COLOR_MATCH
public static final Pattern RGB_COLOR_PATTERN
public static final Pattern PERC_COLOR_PATTERN
public static ColorStyleValidator getInstance()
public void assertValid(String propertyValue) throws MacroParameterValidationException
ParameterValidatorassertValid in interface ParameterValidatorpropertyValue - the property value to validateMacroParameterValidationException - if the property value is invalidCopyright © 2019 Atlassian. All rights reserved.