Hello,

No matter what I type into my creditCard field the creditCard validator check allways comes back with the message Card Number is not a valid credit card number. If I substitute the 'creditCard' check to a 'long' check then I can pass validation by placing a 16 digit long number. Come somebody check my code snippets below to ensure I'm not doing anything wrong..

from validation.xml...

       <!-- Charging form validation -->
       <form name="ChargingForm">
         <field property="paymentMethod" depends="required">
            <arg0 key = "charging.paymentMethod"/>
         </field>
         <field property="cardNumber" depends="required,creditCard">
            <arg0 key = "charging.cardNumber"/>
         </field>
         <field property="expirationMonth" depends="required,date">
            <arg0 key = "charging.expirationMonth"/>
<var><var-name>datePattern</var-name><var-value>MM</var-value></var>
         </field>
         <field property="expirationYear" depends="required,date">
            <arg0 key = "charging.expirationYear"/>
<var><var-name>datePattern</var-name><var-value>yy</var-value></var>
         </field>
         <field property="cardHoldersName" depends="required">
            <arg0 key = "charging.cardHoldersName"/>
         </field>
       </form>

from struts-config.xml...

       <form-bean      name="ChargingForm"
                       type="salesportal.presentation.forms.ChargingForm">
         <form-property name="paymentMethod" type="java.lang.String"/>
         <form-property name="cardNumber" type="java.lang.String"/>
         <form-property name="expirationMonth" type="java.lang.String"/>
         <form-property name="expirationYear" type="java.lang.String"/>
         <form-property name="cardHoldersName" type="java.lang.String"/>
       </form-bean>

Thanks!



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to