Skip to content
This repository has been archived by the owner on Dec 12, 2021. It is now read-only.

Commit

Permalink
Merge tag '0.11.1'
Browse files Browse the repository at this point in the history
0.11.1
  • Loading branch information
ansman committed Nov 6, 2016
2 parents 0492435 + 047f315 commit d7f6baa
Show file tree
Hide file tree
Showing 9 changed files with 42 additions and 15 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "validate",
"description": "Declarative validations for JavaScript",
"main": "validate.js",
"version": "0.11.0",
"version": "0.11.1",
"moduleType": [
"amd",
"globals",
Expand Down
2 changes: 1 addition & 1 deletion component.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"repo" : "ansman/validate.js",
"main" : "validate.js",
"scripts" : ["validate.js"],
"version" : "0.11.0",
"version" : "0.11.1",
"license" : "MIT"
}

14 changes: 12 additions & 2 deletions docs/validate.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ <h1>validate.js</h1>
</div>

<div class="content"><div class='highlight'><pre><span class="hljs-comment">/*!
* validate.js 0.11.0
* validate.js 0.11.1
*
* (c) 2013-2016 Nicklas Ansman, 2013 Wrapp
* Validate.js may be freely distributed under the MIT license.
Expand Down Expand Up @@ -129,7 +129,7 @@ <h1>validate.js</h1>
<div class="content"><div class='highlight'><pre> version: {
major: <span class="hljs-number">0</span>,
minor: <span class="hljs-number">11</span>,
patch: <span class="hljs-number">0</span>,
patch: <span class="hljs-number">1</span>,
metadata: <span class="hljs-literal">null</span>,
toString: <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params"></span>) </span>{
<span class="hljs-keyword">var</span> version = v.format(<span class="hljs-string">"%{major}.%{minor}.%{patch}"</span>, v.version);
Expand Down Expand Up @@ -2086,6 +2086,16 @@ <h1>validate.js</h1>
errors[attr] = v.flattenErrorsToArray(errors[attr]);
}
<span class="hljs-keyword">return</span> errors;
},
constraint: <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">errors</span>) </span>{
<span class="hljs-keyword">var</span> attr;
errors = v.groupErrorsByAttribute(errors);
<span class="hljs-keyword">for</span> (attr <span class="hljs-keyword">in</span> errors) {
errors[attr] = errors[attr].map(<span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">result</span>) </span>{
<span class="hljs-keyword">return</span> result.validator;
}).sort();
}
<span class="hljs-keyword">return</span> errors;
}
};

Expand Down
25 changes: 21 additions & 4 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -404,6 +404,7 @@
<li>
<a href="#changelog">Changelog</a>
<ul>
<li><a href="#changelog-0-11-1">0.11.1</a></li>
<li><a href="#changelog-0-11-0">0.11.0</a></li>
<li><a href="#changelog-0-10-0">0.10.0</a></li>
<li><a href="#changelog-0-9-0">0.9.0</a></li>
Expand Down Expand Up @@ -462,13 +463,13 @@
</p>
<h2 id="downloads">Downloads</h2>
<div class="download">
<a class="btn btn-default" download href="validate.js">Development version (0.11.0)</a>
<a class="btn btn-default" download href="validate.js">Development version (0.11.1)</a>
<div class="info">
<span class="details">33KB, uncompressed and plenty of comments</span>
</div>
</div>
<div class="download">
<a class="btn btn-primary" download href="validate.min.js">Production version (0.11.0)</a>
<a class="btn btn-primary" download href="validate.min.js">Production version (0.11.1)</a>
<div class="info">
<span class="details">4.56KB, minified and gzipped</span><br>
<a download href="validate.min.map">(Source map)</a>
Expand All @@ -489,7 +490,7 @@ <h2 id="downloads">Downloads</h2>
<div id="installing">
<h2>Installing</h2>
<b>Browser/CDN</b>
<pre><code class="html">&lt;script src="//cdnjs.cloudflare.com/ajax/libs/validate.js/0.11.0/validate.min.js"&gt;&lt;/script&gt;</code></pre>
<pre><code class="html">&lt;script src="//cdnjs.cloudflare.com/ajax/libs/validate.js/0.11.1/validate.min.js"&gt;&lt;/script&gt;</code></pre>
<b>Require.js/AMD</b>
<pre><code class="javascript">require(["validate.js"], function(validate) {
// ...
Expand Down Expand Up @@ -2350,7 +2351,23 @@ <h2>Utilities</h2>
</div>
<div id="changelog">
<h2>Changelog</h2>
<div id="changelog-0-11-0">
<div id="changelog-0-11-1">
<h3>
<b class="version">0.11.1</b>
-
<span class="date">Nov 6, 2016</span>
-
<a href="http://htmlpreview.github.com/?https://raw.github.com/ansman/validate.js/0.11.1/index.html">Docs</a>
-
<a href="https://github.com/ansman/validate.js/compare/0.11.0...0.11.1">Diff</a>
</h3>
<ul>
<li>
Fix an error with the typscript bindings.
Thank <a href="https://github.com/ansman/validate.js/issues/168" target="_blank">Jeff Barnes</a> for reporting and fixing this.
</li>
</ul>
</div><div id="changelog-0-11-0">
<h3>
<b class="version">0.11.0</b>
-
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "validate.js",
"version": "0.11.0",
"version": "0.11.1",
"author": "Nicklas Ansman <[email protected]>",
"description": "Declarative validations for JavaScript",
"main": "validate.js",
Expand Down
2 changes: 1 addition & 1 deletion validate.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
export declare interface ValidateJS {
(attributes: any, constraints: any, options?: any): any;
async(attributes, constraints, options?: any): Promise<any>;
async(attributes: any, constraints: any, options?: any): Promise<any>;
single(value: any, constraints: any, options?: any): any;
}

Expand Down
4 changes: 2 additions & 2 deletions validate.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* validate.js 0.11.0
* validate.js 0.11.1
*
* (c) 2013-2016 Nicklas Ansman, 2013 Wrapp
* Validate.js may be freely distributed under the MIT license.
Expand Down Expand Up @@ -57,7 +57,7 @@
version: {
major: 0,
minor: 11,
patch: 0,
patch: 1,
metadata: "development",
toString: function() {
var version = v.format("%{major}.%{minor}.%{patch}", v.version);
Expand Down
4 changes: 2 additions & 2 deletions validate.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion validate.min.map

Large diffs are not rendered by default.

0 comments on commit d7f6baa

Please sign in to comment.