CalifNina
06-12-2003, 09:07 PM
I haven't a clue how to validate on any level. Am asking how to accomplish such a feat for the date (mm dd yyyy)?? ... am building a FORM that has input fields for credit card information ... in the BODY of the code within the FORM, I have the credit card date in three separate fields:
(1) The month is a drop-down/selection box with possible values of an empty selection ... or ... 01-12.
(2) The date is a separate input field limited to two characters. (ie., nn)
(3) The year is a separate input field limited to four characters. (ie., yyyy) Exp Month:
<SELECT NAME="creditCardExpMonth">
<OPTION>
<OPTION>01
<OPTION>02
<OPTION>03
<OPTION>04
<OPTION>05
<OPTION>06
<OPTION>07
<OPTION>08
<OPTION>09
<OPTION>10
<OPTION>11
<OPTION>12
</SELECT>
Exp Date:
<INPUT TYPE="text" VALUE="nn" NAME="creditCardExpDate" SIZE="2" MAXLENGTH="2">
Exp Year:
<INPUT TYPE="text" VALUE="yyyy" NAME="creditCardExpYear" SIZE="4" MAXLENGTH="4">First question: How do I validate the credit card expiration year?
Second question: How do I verify in a comparison with the current date - if the entire credit card expiration is valid (all three areas)?
Are these too complicated? Two-three separate routines to figure out? I have no idea what to do or how to start. Looking for direction, guidance, and code on how to do these Please. Thank You and pls bear with me on this, I am lost.
(1) The month is a drop-down/selection box with possible values of an empty selection ... or ... 01-12.
(2) The date is a separate input field limited to two characters. (ie., nn)
(3) The year is a separate input field limited to four characters. (ie., yyyy) Exp Month:
<SELECT NAME="creditCardExpMonth">
<OPTION>
<OPTION>01
<OPTION>02
<OPTION>03
<OPTION>04
<OPTION>05
<OPTION>06
<OPTION>07
<OPTION>08
<OPTION>09
<OPTION>10
<OPTION>11
<OPTION>12
</SELECT>
Exp Date:
<INPUT TYPE="text" VALUE="nn" NAME="creditCardExpDate" SIZE="2" MAXLENGTH="2">
Exp Year:
<INPUT TYPE="text" VALUE="yyyy" NAME="creditCardExpYear" SIZE="4" MAXLENGTH="4">First question: How do I validate the credit card expiration year?
Second question: How do I verify in a comparison with the current date - if the entire credit card expiration is valid (all three areas)?
Are these too complicated? Two-three separate routines to figure out? I have no idea what to do or how to start. Looking for direction, guidance, and code on how to do these Please. Thank You and pls bear with me on this, I am lost.