Class CssColourValidator
java.lang.Object
org.apache.struts2.validator.validators.ValidatorSupport
org.apache.struts2.validator.validators.FieldValidatorSupport
com.atlassian.confluence.util.misc.CssColourValidator
- All Implemented Interfaces:
org.apache.struts2.validator.FieldValidator,org.apache.struts2.validator.ShortCircuitableValidator,org.apache.struts2.validator.Validator
public class CssColourValidator
extends org.apache.struts2.validator.validators.FieldValidatorSupport
The following are valid values for a CSS colour declaration:
- Any single word with no spaces.
- # followed by 3 or 6 digits
- rgb(n, n, n)
- rgb(n%, n%, n%)
-
Field Summary
Fields inherited from class org.apache.struts2.validator.validators.FieldValidatorSupport
currentValue, fieldName, typeFields inherited from class org.apache.struts2.validator.validators.ValidatorSupport
defaultMessage, EMPTY_STRING, messageKey, stack, textProviderFactory -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class org.apache.struts2.validator.validators.FieldValidatorSupport
getCurrentValue, getFieldName, getValidatorType, setFieldName, setValidatorTypeMethods inherited from class org.apache.struts2.validator.validators.ValidatorSupport
addActionError, addFieldError, getDefaultMessage, getFieldValue, getMessage, getMessageKey, getMessageParameters, getValidatorContext, isShortCircuit, parse, setDefaultMessage, setMessageKey, setMessageParameters, setShortCircuit, setTextProviderFactory, setValidatorContext, setValueStackMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.struts2.validator.Validator
getDefaultMessage, getMessage, getMessageKey, getMessageParameters, getValidatorContext, setDefaultMessage, setMessageKey, setMessageParameters, setValidatorContext, setValueStack
-
Constructor Details
-
CssColourValidator
public CssColourValidator()
-
-
Method Details
-
validate
- Throws:
org.apache.struts2.validator.ValidationException
-
check
Separated for testability
-