Skip to content

Commit

Permalink
Corrected example.
Browse files Browse the repository at this point in the history
  • Loading branch information
RillingDev committed Sep 26, 2020
1 parent 8b96644 commit a129a81
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
## Introduction

Ok is an very small utility library to validate forms with more than what HTML5 offers you.
Ok is a very small utility library to validate forms with more than what HTML5 offers you.
Features include customized messages and validator chaining.

**[Docs](https://felixrilling.github.io/ok/)**
Expand All @@ -18,7 +18,7 @@ npm install okjs --save
### Syntax

```typescript
import {Ok} from "okjs";
import Ok from "okjs";

/**
* Create Ok instance with custom validators
Expand Down Expand Up @@ -81,7 +81,7 @@ Multiple validators can be used for a single field in a given order by chaining
```

```typescript
import {Ok} from "okjs";
import Ok from "okjs";

const ok = new Ok({
nameCaps: {
Expand All @@ -100,7 +100,7 @@ const ok = new Ok({
Ok currently only has one option, the class to use for invalid elements.

```typescript
import {Ok} from "okjs";
import Ok from "okjs";

// The default invalid class('invalid') will be used
new Ok({});
Expand Down
8 changes: 4 additions & 4 deletions docs/globals.html
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ <h1>OkJS</h1>
<a href="#introduction" id="introduction" style="color: inherit; text-decoration: none;">
<h2>Introduction</h2>
</a>
<p>Ok is an very small utility library to validate forms with more than what HTML5 offers you.
<p>Ok is a very small utility library to validate forms with more than what HTML5 offers you.
Features include customized messages and validator chaining.</p>
<p><strong><a href="https://felixrilling.github.io/ok/">Docs</a></strong></p>
<a href="#usage" id="usage" style="color: inherit; text-decoration: none;">
Expand All @@ -76,7 +76,7 @@ <h2>Usage</h2>
<a href="#syntax" id="syntax" style="color: inherit; text-decoration: none;">
<h3>Syntax</h3>
</a>
<pre><code class="language-typescript"><span class="hljs-keyword">import</span> {Ok} <span class="hljs-keyword">from</span> <span class="hljs-string">&quot;okjs&quot;</span>;
<pre><code class="language-typescript"><span class="hljs-keyword">import</span> Ok <span class="hljs-keyword">from</span> <span class="hljs-string">&quot;okjs&quot;</span>;

<span class="hljs-comment">/**
* Create Ok instance with custom validators
Expand Down Expand Up @@ -128,7 +128,7 @@ <h3>Chaining</h3>
<span class="hljs-tag">&lt;<span class="hljs-name">label</span> <span class="hljs-attr">for</span>=<span class="hljs-string">&quot;exampleInputEmail&quot;</span>&gt;</span>Email ID (all caps and ending in .de)<span class="hljs-tag">&lt;/<span class="hljs-name">label</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-name">input</span> <span class="hljs-attr">type</span>=<span class="hljs-string">&quot;email&quot;</span> <span class="hljs-attr">required</span> <span class="hljs-attr">data-ok</span>=<span class="hljs-string">&quot;nameCaps, emailDe&quot;</span>&gt;</span>
<span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span></code></pre>
<pre><code class="language-typescript"><span class="hljs-keyword">import</span> {Ok} <span class="hljs-keyword">from</span> <span class="hljs-string">&quot;okjs&quot;</span>;
<pre><code class="language-typescript"><span class="hljs-keyword">import</span> Ok <span class="hljs-keyword">from</span> <span class="hljs-string">&quot;okjs&quot;</span>;

<span class="hljs-keyword">const</span> ok = <span class="hljs-keyword">new</span> Ok({
nameCaps: {
Expand All @@ -144,7 +144,7 @@ <h3>Chaining</h3>
<h2>Options</h2>
</a>
<p>Ok currently only has one option, the class to use for invalid elements.</p>
<pre><code class="language-typescript"><span class="hljs-keyword">import</span> {Ok} <span class="hljs-keyword">from</span> <span class="hljs-string">&quot;okjs&quot;</span>;
<pre><code class="language-typescript"><span class="hljs-keyword">import</span> Ok <span class="hljs-keyword">from</span> <span class="hljs-string">&quot;okjs&quot;</span>;

<span class="hljs-comment">// The default invalid class(&#x27;invalid&#x27;) will be used</span>
<span class="hljs-keyword">new</span> Ok({});
Expand Down
8 changes: 4 additions & 4 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ <h1>OkJS</h1>
<a href="#introduction" id="introduction" style="color: inherit; text-decoration: none;">
<h2>Introduction</h2>
</a>
<p>Ok is an very small utility library to validate forms with more than what HTML5 offers you.
<p>Ok is a very small utility library to validate forms with more than what HTML5 offers you.
Features include customized messages and validator chaining.</p>
<p><strong><a href="https://felixrilling.github.io/ok/">Docs</a></strong></p>
<a href="#usage" id="usage" style="color: inherit; text-decoration: none;">
Expand All @@ -76,7 +76,7 @@ <h2>Usage</h2>
<a href="#syntax" id="syntax" style="color: inherit; text-decoration: none;">
<h3>Syntax</h3>
</a>
<pre><code class="language-typescript"><span class="hljs-keyword">import</span> {Ok} <span class="hljs-keyword">from</span> <span class="hljs-string">&quot;okjs&quot;</span>;
<pre><code class="language-typescript"><span class="hljs-keyword">import</span> Ok <span class="hljs-keyword">from</span> <span class="hljs-string">&quot;okjs&quot;</span>;

<span class="hljs-comment">/**
* Create Ok instance with custom validators
Expand Down Expand Up @@ -128,7 +128,7 @@ <h3>Chaining</h3>
<span class="hljs-tag">&lt;<span class="hljs-name">label</span> <span class="hljs-attr">for</span>=<span class="hljs-string">&quot;exampleInputEmail&quot;</span>&gt;</span>Email ID (all caps and ending in .de)<span class="hljs-tag">&lt;/<span class="hljs-name">label</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-name">input</span> <span class="hljs-attr">type</span>=<span class="hljs-string">&quot;email&quot;</span> <span class="hljs-attr">required</span> <span class="hljs-attr">data-ok</span>=<span class="hljs-string">&quot;nameCaps, emailDe&quot;</span>&gt;</span>
<span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span></code></pre>
<pre><code class="language-typescript"><span class="hljs-keyword">import</span> {Ok} <span class="hljs-keyword">from</span> <span class="hljs-string">&quot;okjs&quot;</span>;
<pre><code class="language-typescript"><span class="hljs-keyword">import</span> Ok <span class="hljs-keyword">from</span> <span class="hljs-string">&quot;okjs&quot;</span>;

<span class="hljs-keyword">const</span> ok = <span class="hljs-keyword">new</span> Ok({
nameCaps: {
Expand All @@ -144,7 +144,7 @@ <h3>Chaining</h3>
<h2>Options</h2>
</a>
<p>Ok currently only has one option, the class to use for invalid elements.</p>
<pre><code class="language-typescript"><span class="hljs-keyword">import</span> {Ok} <span class="hljs-keyword">from</span> <span class="hljs-string">&quot;okjs&quot;</span>;
<pre><code class="language-typescript"><span class="hljs-keyword">import</span> Ok <span class="hljs-keyword">from</span> <span class="hljs-string">&quot;okjs&quot;</span>;

<span class="hljs-comment">// The default invalid class(&#x27;invalid&#x27;) will be used</span>
<span class="hljs-keyword">new</span> Ok({});
Expand Down

0 comments on commit a129a81

Please sign in to comment.