-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
16 changed files
with
557 additions
and
157 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,28 +3,28 @@ | |
<head> | ||
<meta charset="utf-8" /> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | ||
<meta name="generator" content="Crystal Docs 0.34.0"> | ||
<meta name="generator" content="Crystal Docs 0.35.1"> | ||
<meta name="crystal_docs.project_version" content="master-dev"> | ||
<meta name="crystal_docs.project_name" content="validator"> | ||
|
||
|
||
|
||
<link href="../css/style.css" rel="stylesheet" type="text/css" /> | ||
<script type="text/javascript" src="../js/doc.js"></script> | ||
|
||
<svg class="hidden"> | ||
<symbol id="octicon-link" viewBox="0 0 16 16"> | ||
<path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path> | ||
</symbol> | ||
</svg> | ||
|
||
<meta id="repository-name" content="validator"> | ||
<meta name="repository-name" content="validator"> | ||
<title>Check::CheckableStatic - validator master-dev</title> | ||
<script type="text/javascript"> | ||
CrystalDocs.base_path = "../"; | ||
</script> | ||
</head> | ||
<body> | ||
|
||
<svg class="hidden"> | ||
<symbol id="octicon-link" viewBox="0 0 16 16"> | ||
<path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path> | ||
</symbol> | ||
</svg> | ||
<div class="sidebar"> | ||
<div class="sidebar-header"> | ||
<div class="search-box"> | ||
|
@@ -44,7 +44,7 @@ <h1 class="project-name"> | |
</div> | ||
</div> | ||
|
||
<div class="search-results" class="hidden"> | ||
<div class="search-results hidden"> | ||
<ul class="search-list"></ul> | ||
</div> | ||
|
||
|
@@ -86,6 +86,11 @@ <h1 class="project-name"> | |
|
||
</li> | ||
|
||
<li class=" " data-id="validator/Check/ValidationError" data-name="check::validationerror"> | ||
<a href="../Check/ValidationError.html">ValidationError</a> | ||
|
||
</li> | ||
|
||
</ul> | ||
|
||
|
||
|
@@ -278,7 +283,7 @@ <h2> | |
which is provided in the third argument. | ||
You can update this cleaned hash but you have to return it.</p> | ||
|
||
<pre><code><span class="c"># Triggered on a static call: `User.check(h)` (with a `Hash` or `JSON::Any`)</span> | ||
<pre><code class="language-crystal"><span class="c"># Triggered on a static call: `User.check(h)` (with a `Hash` or `JSON::Any`)</span> | ||
<span class="k">def</span> <span class="m">self</span>.after_check(v : <span class="t">Check</span><span class="t">::</span><span class="t">Validation</span>, h, cleaned_h, required : <span class="t">Bool</span> <span class="o">=</span> <span class="n">true</span>, format : <span class="t">Bool</span> <span class="o">=</span> <span class="n">true</span>) : <span class="t">Hash</span> | ||
<span class="c"># Code...</span> | ||
pp cleaned_h | ||
|
@@ -304,7 +309,7 @@ <h2> | |
|
||
<p>Lifecycle method triggered before each call of <code><a href="../Check/CheckableStatic.html#check(v:Check::Validation,h:Hash,required:Bool=true,format:Bool=true)-instance-method">.check</a></code>.</p> | ||
|
||
<pre><code><span class="c"># Triggered on a static call: `User.check(h)` (with a `Hash` or `JSON::Any`)</span> | ||
<pre><code class="language-crystal"><span class="c"># Triggered on a static call: `User.check(h)` (with a `Hash` or `JSON::Any`)</span> | ||
<span class="k">def</span> <span class="m">self</span>.before_check(v : <span class="t">Check</span><span class="t">::</span><span class="t">Validation</span>, h, required : <span class="t">Bool</span> <span class="o">=</span> <span class="n">true</span>, format : <span class="t">Bool</span> <span class="o">=</span> <span class="n">true</span>) | ||
<span class="c"># Code...</span> | ||
pp h | ||
|
@@ -390,7 +395,7 @@ <h2> | |
that the <code>JSON.parse</code> has been processed successfully or not and the 2nd | ||
argument is the <em>json</em> Hash.</p> | ||
|
||
<pre><code>ok, user_h <span class="o">=</span> <span class="t">User</span>.h_from_json(json) <span class="c"># => true, {"username" => "Bob", "email" => "[email protected]"}</span></code></pre> | ||
<pre><code class="language-crystal">ok, user_h <span class="o">=</span> <span class="t">User</span>.h_from_json(json) <span class="c"># => true, {"username" => "Bob", "email" => "[email protected]"}</span></code></pre> | ||
</div> | ||
|
||
<br/> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.