Project Documentation

Summary

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

Usage

<h:inputText id="creditCardNumber"
                value="#{validateForm.creditCardNumber}"
                required="true">
    <t:validateCreditCard />
</h:inputText>

Instructions

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!

Attributes

Name Type Supports EL? Description
amex boolean Yes american express cards
detailMessage String Yes alternate validation error detail message format string (use 'message' and 'detailMessage' alternatively)
discover boolean Yes validation for discover
mastercard boolean Yes validation for mastercard
message String Yes alternate validation error detail message format string (use 'message' and 'detailMessage' alternatively)
none boolean Yes none of the given cardtypes is allowed.
summaryMessage String Yes alternate validation error summary message format string
visa boolean Yes validation for visa