Re: [w3c/payment-request] validate PaymentCurrencyAmount.currency (closes #490) (#567)

marcoscaceres commented on this pull request.



> +          <a data-cite=
+          "!ecma-402#sec-iswellformedcurrencycode">IsWellFormedCurrencyCode</a>
+          abstract operation with <a>currency</a> as the argument.
+          </li>
+          <li>If <var>isValidCurrency</var> returns false, then throw a
+          <a>RangeError</a> exception and terminate this algorithm, optionally
+          informing the developer that the currency is invalid.
+          </li>
+          <li>Let <var>value</var> be <var>amount</var>'s <a>value</a>.
+          </li>
+          <li>If <var>value</var> is not a <a>valid decimal monetary value</a>,
+          throw a <a>TypeError</a>, optionally informing the developer that the
+          currency is invalid.
+          </li>
+          <li>Canonicalize <a>currency</a> by converting it to upper case.
+          </li>

ASCII uppercasing is correct. 

-- 
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/pull/567#discussion_r130522204

Received on Tuesday, 1 August 2017 05:29:55 UTC