Project Documentation


Tag name: <t:validateCreditCard>
Validator class: org.apache.myfaces.custom.creditcardvalidator.CreditCardValidator
Tag class: org.apache.myfaces.custom.creditcardvalidator.ValidateCreditCardTag
validator id: org.apache.myfaces.validator.CreditCard
A custom validator for creditCards, based upon Jakarta Commons. Unless otherwise specified, all attributes accept static values or EL expressions


<h:inputText id="creditCardNumber"
    <t:validateCreditCard />


By default, all cards are allowed. You can disable one with card="false". Note if you specify none="true", all cardtypes will be ignored. It is based upon Jakarta Commons' Validator.

See "examples/validate.jsp" for an example!


Name Type Supports EL? Description
amex boolean Yes american express cards
detailMessage String Yes
discover boolean Yes validation for discover
mastercard boolean Yes validation for mastercard
message String Yes
none boolean Yes none of the given cardtypes is allowed.
summaryMessage String Yes
visa boolean Yes validation for visa