Closed mhahmadi closed 6 years ago
Trust the tests. I'll update the spec tomorrow.
Actually, re-reading, I think I removed the "ignore invalid ones" already. Can you point me to the section where it says a user agent must ignore invalid PMIs? Did I miss it?
See the second note in https://w3c.github.io/payment-method-id/#validity-0
Thanks! Heh, I've been looking at specs for so long my brain automatically skips over non-normative notes 🙃
Thank you for the quick turnaround Marcos.
https://w3c.github.io/payment-method-id/ mentions the following invalid method identifiers are all ignored by the user agent. Some user agents might inform developers that identifiers are invalid to help them fix issues. const invalid = [ { // ❌ Contains Unicode character outside the valid ranges. supportedMethods: "basic-💳", }, { // ❌ Contains uppercase characters. supportedMethods: "Basic-Card", }, { // ❌ Contains Unicode characters outside the valid ranges. supportedMethods: "¡basic-*-card!", }, ];
However the following test expects a RangeError to be thrown when such PMIs are encountered. https://w3c-test.org/payment-request/payment-request-ctor-pmi-handling.https.html
@marcoscaceres, which one is to be trusted?