public class ExpressionValidator extends ValidatorSupport
 
     <validators>
           <validator type="expression">
              <param name="expression"> .... </param>
              <message>Failed to meet Ognl Expression  .... </message>
           </validator>
     </validators>
 
 defaultMessage, EMPTY_STRING, messageKey, stack, textProviderFactory| Constructor and Description | 
|---|
| ExpressionValidator() | 
| Modifier and Type | Method and Description | 
|---|---|
| String | getExpression() | 
| void | setExpression(String expression) | 
| void | validate(Object object)The validation implementation must guarantee that setValidatorContext will
 be called with a non-null ValidatorContext before validate is called. | 
addActionError, addFieldError, getDefaultMessage, getFieldValue, getMessage, getMessageKey, getMessageParameters, getValidatorContext, getValidatorType, isShortCircuit, parse, setDefaultMessage, setMessageKey, setMessageParameters, setShortCircuit, setTextProviderFactory, setValidatorContext, setValidatorType, setValueStackpublic void setExpression(String expression)
public String getExpression()
public void validate(Object object) throws ValidationException
Validatorobject - the object to be validated.ValidationException - is thrown if there is validation error(s).Copyright © 2000–2025 Apache Software Foundation. All rights reserved.