org.hibernate.validator.CreditCardNumberValidator Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of hibernate-validator-legacy Show documentation
Show all versions of hibernate-validator-legacy Show documentation
Following the DRY (Don't Repeat Yourself) principle, Hibernate Validator let's you express your domain
constraints once (and only once) and ensure their compliance at various level of your system automatically.
//$Id: CreditCardNumberValidator.java 15133 2008-08-20 10:05:57Z hardy.ferentschik $
package org.hibernate.validator;
import java.io.Serializable;
/**
* Check a credit card number through the Luhn algorithm
*
* @author Emmanuel Bernard
*/
public class CreditCardNumberValidator extends AbstractLuhnValidator implements Validator, Serializable {
public void initialize(CreditCardNumber parameters) {
}
int multiplicator() {
return 2;
}
}