[whatwg] Re: credit card numbers
fantasai
fantasai.lists at inkedblade.net
Wed Aug 4 08:17:14 PDT 2004
Håkon Wium Lie wrote:
> Also sprach fantasai:
>
> > The type attribute is for giving the *type* of data, not for indicating
> > what it's used for.
>
> This depends on your definition of "type" and "used for". I can make
> the argument that "expdate" is a type ("01/07") which is independent
> of what it is used for.
Most of the credit card inputs I've seen consist of dropdowns for month
and date, or a text input + a drop-down. They make it entirely unambiguous,
on the form, which field is the month and which the date. I've never seen
any form request "MM/YY" format in a text box.
> So, which of these would work in WF2?:
>
> <input type="text" pattern="[0-9]{10}" name="cc" />
> <input type="text" pattern="[0-9]{10}" name="Ecom_Payment_Card_Number" />
> <input type="number" name="Ecom_Payment_Card_Number" />
> <input name="Ecom_Payment_Card_Number" />
All of them, I would assume. For the Ecom fields, the wallet will see
"ah, this field is for the card number, I will fill it in". Unless
there's a syntax conflict between the stored Ecom data and the field
definition, there's no problem. Like I said, all we really need is to
add a few more field names to handle things like dates, which are
currently defined in multiple fields in RFC3106 but for which we have
a single combination field. For example, we can add
Ecom_Payment_Card_ExpDate_Date to the list of Ecom field names.
One thing we could do is to create an appendix that recommends certain
input types for certain Ecom fields. (For example, the best way to
represent an Ecom_Payment_Card_Number is with the second input you gave
there; it's not a numerical value so much as an ID string that only uses
digits.) It is, however, not necessary to use the recommended field type.
> Instead of doing ECML half-heartedly, why not extract the most useful
> types/names (including credit card numbers and expire dates) and
> describe them in WF2?
If we want to expand on RFC3102, then the appropriate way to do it would
be to submit an RFC that supersedes it, no?
(Web Forms 2.0 already includes all of ECML by reference; there's no need
to copy/paste text from it.)
~fantasai
--
http://fantasai.inkedblade.net/contact
More information about the whatwg
mailing list