Package org.apache.struts2.validator.validators

# Class CreditCardValidator

java.lang.Object
org.apache.struts2.validator.validators.ValidatorSupport
org.apache.struts2.validator.validators.FieldValidatorSupport
org.apache.struts2.validator.validators.RegexFieldValidator
org.apache.struts2.validator.validators.CreditCardValidator

All Implemented Interfaces:
  `FieldValidator`, `ShortCircuitableValidator`, `Validator`

public class CreditCardValidator extends RegexFieldValidator
CreditCardFieldValidator checks that a given String/Array/Collection field, if not empty, is a valid credit card number.

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final String`
  `CREDIT_CARD_PATTERN`

  ### Fields inherited from class org.apache.struts2.validator.validators.FieldValidatorSupport

  `currentValue, fieldName, type`

  ### Fields inherited from class org.apache.struts2.validator.validators.ValidatorSupport

  `defaultMessage, EMPTY_STRING, messageKey, stack, textProviderFactory`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `CreditCardValidator()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `protected void`
  `validateFieldValue(Object object, String value, String regexToUse)`

  ### Methods inherited from class org.apache.struts2.validator.validators.RegexFieldValidator

  `getRegex, isCaseSensitive, isTrimed, setCaseSensitive, setCaseSensitiveExpression, setRegex, setRegexExpression, setTrim, setTrimExpression, validate`

  ### Methods inherited from class org.apache.struts2.validator.validators.FieldValidatorSupport

  `getCurrentValue, getFieldName, getValidatorType, setFieldName, setValidatorType`

  ### Methods 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, setValueStack`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

  ### Methods inherited from interface org.apache.struts2.validator.Validator

  `getDefaultMessage, getMessage, getMessageKey, getMessageParameters, getValidatorContext, setDefaultMessage, setMessageKey, setMessageParameters, setValidatorContext, setValueStack`

- ## Field Details

  - ### CREDIT_CARD_PATTERN

    public static final String CREDIT_CARD_PATTERN
    See Also:
      - Constant Field Values

- ## Constructor Details

  - ### CreditCardValidator

    public CreditCardValidator()

- ## Method Details

  - ### validateFieldValue

    protected void validateFieldValue(Object object, String value, String regexToUse)
    Overrides:
      `validateFieldValue` in class `RegexFieldValidator`