- From: Marcos Cáceres <notifications@github.com>
- Date: Wed, 02 May 2018 21:21:46 -0700
- To: w3c/payment-request <payment-request@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
- Message-ID: <w3c/payment-request/issues/647/386188031@github.com>
> I'm not sure any UAs plan to expose the underlying languageCode so I'm not sure how useful an error message for it would be but I think it's fine to be consistent and support errors on all fields in the shipping address. Agree. > Tangent: I'd rather we fixed the misnomer of addressLine => addressLines everywhere rather than continuing to propagate it I'm thinking it might be too late... consider what happened already when we changed `supportedMethods` to a string. I think we are still dealing with the fallout. > support both in the code already shipped in UAs treating the old name as an alias to the new name. I personally think this will cause confusion, as people might think they can set one or the other, but then one will trash the other, etc. Naming things is hard 😢 That reminds me, nevertheless, that maybe `addressLine` needs special treatment, because it's a sequence of lines. So, maybe we actually need: ```JS (DOMString or sequence<DOMString?>) addressLine; ``` We could say that: * When it's a DOMString - the whole address is bad. * When it's a sequence, the UA can match the errors to particular lines. So: ```JS // The whole address is bad! const addressErrors.addressLine = "Look, buddy, I can't ship to a PO Box!"; // Address is partially bad! const addressErrors.addressLine = [ null, "the second line is bad!", null, "the fourth line is bad!" ]; ``` Or is that overkill? -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/w3c/payment-request/issues/647#issuecomment-386188031
Received on Thursday, 3 May 2018 04:22:38 UTC