Class FieldValidatorSupport
java.lang.Object
org.apache.struts2.validator.validators.ValidatorSupport
org.apache.struts2.validator.validators.FieldValidatorSupport
- All Implemented Interfaces:
- FieldValidator,- ShortCircuitableValidator,- Validator
- Direct Known Subclasses:
- DoubleRangeFieldValidator,- FieldExpressionValidator,- RangeValidatorSupport,- RegexFieldValidator,- RepopulateConversionErrorFieldValidatorSupport,- RequiredFieldValidator,- RequiredStringValidator,- StringLengthFieldValidator,- URLValidator,- VisitorFieldValidator
Base class for field validators.
 You can access fieldName and its currentValue in a message using expression, e.g.
 "Wrong value ${currentValue} for ${fieldName}"
- 
Field SummaryFieldsFields inherited from class org.apache.struts2.validator.validators.ValidatorSupportdefaultMessage, EMPTY_STRING, messageKey, stack, textProviderFactory
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionGets the field name to be validatedGets the validator type used (see class javadoc).voidsetFieldName(String fieldName) Sets the field name to validate with this FieldValidatorvoidsetValidatorType(String type) Sets the validator type to use (see class javadoc).Methods inherited from class org.apache.struts2.validator.validators.ValidatorSupportaddActionError, addFieldError, getDefaultMessage, getFieldValue, getMessage, getMessageKey, getMessageParameters, getValidatorContext, isShortCircuit, parse, setDefaultMessage, setMessageKey, setMessageParameters, setShortCircuit, setTextProviderFactory, setValidatorContext, setValueStackMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.struts2.validator.ValidatorgetDefaultMessage, getMessage, getMessageKey, getMessageParameters, getValidatorContext, setDefaultMessage, setMessageKey, setMessageParameters, setValidatorContext, setValueStack, validate
- 
Field Details- 
fieldName
- 
type
- 
currentValue
 
- 
- 
Constructor Details- 
FieldValidatorSupportpublic FieldValidatorSupport()
 
- 
- 
Method Details- 
setFieldNameDescription copied from interface:FieldValidatorSets the field name to validate with this FieldValidator- Specified by:
- setFieldNamein interface- FieldValidator
- Parameters:
- fieldName- the field name
 
- 
getFieldNameDescription copied from interface:FieldValidatorGets the field name to be validated- Specified by:
- getFieldNamein interface- FieldValidator
- Returns:
- the field name
 
- 
setValidatorTypeDescription copied from interface:ValidatorSets the validator type to use (see class javadoc).- Specified by:
- setValidatorTypein interface- Validator
- Overrides:
- setValidatorTypein class- ValidatorSupport
- Parameters:
- type- the type to use.
 
- 
getValidatorTypeDescription copied from interface:ValidatorGets the validator type used (see class javadoc).- Specified by:
- getValidatorTypein interface- Validator
- Overrides:
- getValidatorTypein class- ValidatorSupport
- Returns:
- the type used
 
- 
getCurrentValue
 
-