summaryrefslogtreecommitdiffstats
path: root/docs/en/cowboy/2.2/guide/constraints/index.html
diff options
context:
space:
mode:
Diffstat (limited to 'docs/en/cowboy/2.2/guide/constraints/index.html')
-rw-r--r--docs/en/cowboy/2.2/guide/constraints/index.html12
1 files changed, 7 insertions, 5 deletions
diff --git a/docs/en/cowboy/2.2/guide/constraints/index.html b/docs/en/cowboy/2.2/guide/constraints/index.html
index 7405b833..7ab31189 100644
--- a/docs/en/cowboy/2.2/guide/constraints/index.html
+++ b/docs/en/cowboy/2.2/guide/constraints/index.html
@@ -71,7 +71,7 @@
<p>Constraints for each field are provided as an ordered list of atoms or funs to apply. Built-in constraints are provided as atoms, while custom constraints are provided as funs.</p>
<p>When multiple constraints are provided, they are applied in the order given. If the value has been modified by a constraint then the next one receives the new value.</p>
<p>For example, the following constraints will first validate and convert the field <code>my_value</code> to an integer, and then check that the integer is positive:</p>
-<div class="listingblock"><div class="content"><!-- Generator: GNU source-highlight 3.1.8
+<div class="listingblock"><div class="content"><!-- Generator: GNU source-highlight 3.1.9
by Lorenzo Bettini
http://www.lorenzobettini.it
http://www.gnu.org/software/src-highlite -->
@@ -85,7 +85,7 @@ http://www.gnu.org/software/src-highlite -->
</div></div>
<p>We ignore the first fun argument in this snippet. We shouldn&apos;t. We will simply learn what it is later in this chapter.</p>
<p>When there&apos;s only one constraint, it can be provided directly without wrapping it into a list:</p>
-<div class="listingblock"><div class="content"><!-- Generator: GNU source-highlight 3.1.8
+<div class="listingblock"><div class="content"><!-- Generator: GNU source-highlight 3.1.9
by Lorenzo Bettini
http://www.lorenzobettini.it
http://www.gnu.org/software/src-highlite -->
@@ -107,7 +107,7 @@ http://www.gnu.org/software/src-highlite -->
<h2 id="_custom_constraints">Custom constraints</h2>
<p>Custom constraints are specified as a fun. This fun takes two arguments. The first argument indicates the operation to be performed, and the second is the value. What the value is and what must be returned depends on the operation.</p>
<p>Cowboy currently defines three operations. The operation used for validating and converting user input is the <code>forward</code> operation.</p>
-<div class="listingblock"><div class="content"><!-- Generator: GNU source-highlight 3.1.8
+<div class="listingblock"><div class="content"><!-- Generator: GNU source-highlight 3.1.9
by Lorenzo Bettini
http://www.lorenzobettini.it
http://www.gnu.org/software/src-highlite -->
@@ -120,7 +120,7 @@ http://www.gnu.org/software/src-highlite -->
</div></div>
<p>The value must be returned even if it is not converted by the constraint.</p>
<p>The <code>reverse</code> operation does the opposite: it takes a converted value and changes it back to what the user input would have been.</p>
-<div class="listingblock"><div class="content"><!-- Generator: GNU source-highlight 3.1.8
+<div class="listingblock"><div class="content"><!-- Generator: GNU source-highlight 3.1.9
by Lorenzo Bettini
http://www.lorenzobettini.it
http://www.gnu.org/software/src-highlite -->
@@ -132,7 +132,7 @@ http://www.gnu.org/software/src-highlite -->
<b><font color="#0000FF">end</font></b>;</tt></pre>
</div></div>
<p>Finally, the <code>format_error</code> operation takes an error returned by any other operation and returns a formatted human-readable error message.</p>
-<div class="listingblock"><div class="content"><!-- Generator: GNU source-highlight 3.1.8
+<div class="listingblock"><div class="content"><!-- Generator: GNU source-highlight 3.1.9
by Lorenzo Bettini
http://www.lorenzobettini.it
http://www.gnu.org/software/src-highlite -->
@@ -198,6 +198,8 @@ http://www.gnu.org/software/src-highlite -->
+ <li><a href="/docs/en/cowboy/2.7/guide">2.7</a></li>
+
<li><a href="/docs/en/cowboy/2.6/guide">2.6</a></li>
<li><a href="/docs/en/cowboy/2.5/guide">2.5</a></li>