Skip to content

Commit

Permalink
Define generalized PMI validator
Browse files Browse the repository at this point in the history
  • Loading branch information
marcoscaceres committed Aug 15, 2017
1 parent 44e8787 commit ff09155
Showing 1 changed file with 22 additions and 4 deletions.
26 changes: 22 additions & 4 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,28 @@ <h2>
<a>standardized payment method identifier</a>.
</li>
</ul>
<section>
<h3>
Validity
</h3>
<p>
The steps to <dfn>validate a payment method identifier</dfn> with a
string <var>pmi</var> are given by the following algorithm. It
returns either true or false.
</p>
<ol>
<li>Let <var>url</var> be the result of running the <a data-cite=
"!url##concept-basic-url-parser">basic URL parser</a> with
<var>pmi</var>.
</li>
<li>If <var>url</var> is failure, <a>validate a standardized payment
method identifier</a> with <var>pmi</var> and return the result.
</li>
<li>Otherwise, <a>validate a URL-based payment method identifier</a>
passing <var>url</var> and return the result.
</li>
</ol>
</section>
</section>
<section>
<h2>
Expand Down Expand Up @@ -194,10 +216,6 @@ <h2>
the purpose of standardization, be sure that it conforms to the
following regular expression: <code>[a-z0-9-]+</code>.
</p>
<p>
User agents MUST NOT enforce validity or well-formedness of
<a>standardized payment method identifiers</a>.
</p>
<div class="note">
<p>
When used in an API, the following method identifiers are all
Expand Down

0 comments on commit ff09155

Please sign in to comment.