Re: [w3c/browser-payment-api] validate supportedMethods (#464)

@domenic, was working on a PR for this but got stuck. What should happen if:

```JS
const bad = [
  {
    // Contains Unicode character outside the valid ranges.
    supportedMethods: "💳-card",
  },
  {
    // Contains uppercase characters.
    supportedMethods: "Basic-Card",
  },
  {
    // Contains Unicode characters outside the valid ranges.
    supportedMethods: "¡basic-*-card!",
  },
  {
    // contains completely invalid url.
    supportedMethods: "http://user:pass@example.com:12131231123321",
  },
];

const pr = new PaymentRequest(bad, details);
```

Should we:

 * drop invalid ones, and throw if result is ends up being an empty list?
 * .show() reject on show, because they are all bad?
 * just set computer on fire? 🔥



-- 
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/browser-payment-api/issues/464#issuecomment-317380578

Received on Monday, 24 July 2017 10:20:27 UTC