Class CreditCardValidator
java.lang.Object
com.opensymphony.xwork2.validator.validators.ValidatorSupport
com.opensymphony.xwork2.validator.validators.FieldValidatorSupport
com.opensymphony.xwork2.validator.validators.RegexFieldValidator
com.opensymphony.xwork2.validator.validators.CreditCardValidator
- All Implemented Interfaces:
FieldValidator
,ShortCircuitableValidator
,Validator
CreditCardFieldValidator checks that a given String/Array/Collection field,
if not empty, is a valid credit card number.
-
Field Summary
FieldsFields inherited from class com.opensymphony.xwork2.validator.validators.FieldValidatorSupport
currentValue, fieldName, type
Fields inherited from class com.opensymphony.xwork2.validator.validators.ValidatorSupport
defaultMessage, EMPTY_STRING, messageKey, stack, textProviderFactory
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
validateFieldValue
(Object object, String value, String regexToUse) Methods inherited from class com.opensymphony.xwork2.validator.validators.RegexFieldValidator
getRegex, isCaseSensitive, isTrimed, setCaseSensitive, setCaseSensitiveExpression, setRegex, setRegexExpression, setTrim, setTrimExpression, validate
Methods inherited from class com.opensymphony.xwork2.validator.validators.FieldValidatorSupport
getCurrentValue, getFieldName, getValidatorType, setFieldName, setValidatorType
Methods inherited from class com.opensymphony.xwork2.validator.validators.ValidatorSupport
addActionError, addFieldError, getDefaultMessage, getFieldValue, getMessage, getMessageKey, getMessageParameters, getValidatorContext, isShortCircuit, parse, setDefaultMessage, setMessageKey, setMessageParameters, setShortCircuit, setTextProviderFactory, setValidatorContext, setValueStack
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.opensymphony.xwork2.validator.Validator
getDefaultMessage, getMessage, getMessageKey, getMessageParameters, getValidatorContext, setDefaultMessage, setMessageKey, setMessageParameters, setValidatorContext, setValueStack
-
Field Details
-
CREDIT_CARD_PATTERN
- See Also:
-
-
Constructor Details
-
CreditCardValidator
public CreditCardValidator()
-
-
Method Details
-
validateFieldValue
- Overrides:
validateFieldValue
in classRegexFieldValidator
-