org.apache.wicket.validation.validator
Class CreditCardValidator
java.lang.Object
org.apache.wicket.validation.validator.AbstractValidator<java.lang.String>
org.apache.wicket.validation.validator.CreditCardValidator
- All Implemented Interfaces:
- java.io.Serializable, IClusterable, INullAcceptingValidator<java.lang.String>, IValidator<java.lang.String>
public class CreditCardValidator
- extends AbstractValidator<java.lang.String>
Performs the so-called "mod 10" algorithm to check the validity of credit card numbers such as
VISA.
In addition to this, the credit card number can be further validated by its length and prefix,
but those properties depend upon the credit card type, and such validation is not performed by
this validator.
- Since:
- 1.2.6
- Author:
- Johan Compagner
- See Also:
- Serialized Form
Method Summary |
protected void |
onValidate(IValidatable<java.lang.String> validatable)
Validates the IValidatable instance. |
Methods inherited from class org.apache.wicket.validation.validator.AbstractValidator |
error, error, error, error, messageModel, resourceKey, resourceKey, validate, validate, validateOnNullValue, variablesMap |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CreditCardValidator
public CreditCardValidator()
onValidate
protected void onValidate(IValidatable<java.lang.String> validatable)
- Description copied from class:
AbstractValidator
- Validates the
IValidatable
instance.
- Specified by:
onValidate
in class AbstractValidator<java.lang.String>
- Parameters:
validatable
- the given IValidatable
instance- See Also:
AbstractValidator.onValidate(IValidatable)
Copyright © 2004-2009 Apache Software Foundation. All Rights Reserved.