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 10, 2017
1 parent 44e8787 commit 2b84075
Showing 1 changed file with 21 additions and 4 deletions.
25 changes: 21 additions & 4 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,27 @@ <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
<var>pmi</var> string are given by the following algorithm. It
returns either a true or false.
</p>
<ol>
<li>Let <var>url</var> be the result of running the <a>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 +215,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 2b84075

Please sign in to comment.