com.sun.faces.ext.validator
public class CreditCardValidator extends java.lang.Object implements javax.faces.validator.Validator, java.io.Serializable
Constructor and Description |
---|
CreditCardValidator() |
Modifier and Type | Method and Description |
---|---|
private boolean |
luhnCheck(java.lang.String number) |
private java.lang.String |
stripNonDigit(java.lang.String s) |
void |
validate(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component,
java.lang.Object obj)
Validate a String against a regular expression pattern...
|
public void validate(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component, java.lang.Object obj)
validate
in interface javax.faces.validator.Validator
context
- Context of this requestcomponent
- The component wrapping this validatorobj
- A string which will be compared to the pattern property of this validator. Must be a string.private java.lang.String stripNonDigit(java.lang.String s)
private boolean luhnCheck(java.lang.String number)
Copyright © 2002-2010 Oracle America, Inc. All Rights Reserved.