async-validate
Advanced tools
Comparing version 0.1.9 to 0.1.11
@@ -21,3 +21,3 @@ var util = require('util'); | ||
} | ||
var dt = moment(value, rule.format); | ||
var dt = moment(Date.parse(value), rule.format); | ||
if(!dt) { | ||
@@ -24,0 +24,0 @@ errors.push(error(rule, |
{ | ||
"name": "async-validate", | ||
"description": "Asynchronous validation for object properties.", | ||
"version": "0.1.9", | ||
"version": "0.1.11", | ||
"author": "muji <noop@xpm.io>", | ||
"repository": { | ||
"type": "git", | ||
"url": "git://github.com/freeformsystems/validate.git" | ||
"url": "https://github.com/freeformsystems/async-validate.git" | ||
}, | ||
"keywords": ["validation","validate","valid","object"], | ||
"keywords": [ | ||
"validation", | ||
"validate", | ||
"valid", | ||
"object" | ||
], | ||
"scripts": { | ||
"test": "make test" | ||
"test": "mocha -u tdd --reporter list" | ||
}, | ||
"dependencies": { | ||
"async": ">= 0.2.9", | ||
"moment": ">= 2.0.0" | ||
"async": "~0.9.0", | ||
"moment": "~2.7.0" | ||
}, | ||
"devDependencies": { | ||
"strike": "== 0.1.66", | ||
"mocha": ">= 1.9.0", | ||
@@ -21,0 +25,0 @@ "chai": ">= 1.6.0", |
@@ -88,3 +88,3 @@ # async-validate | ||
THe options passed to `validate` are passed on to the validation functions so that you may reference transient data (such as model references) in validation functions. However, some option names are reserved; if you use these properties of the options object they are overwritten. The reserved properties are `messages`, `exception` and `error`. | ||
The options passed to `validate` are passed on to the validation functions so that you may reference transient data (such as model references) in validation functions. However, some option names are reserved; if you use these properties of the options object they are overwritten. The reserved properties are `messages`, `exception` and `error`. | ||
@@ -91,0 +91,0 @@ ```javascript |
@@ -50,4 +50,4 @@ var util = require('util'); | ||
validator.validate({active: "13-06-24"}, function(errors, fields) { | ||
assert.equal(errors.length, 1); | ||
//console.log(errors[0].message); | ||
assert.equal(errors.length, 2); | ||
//console.log(errors); | ||
assert.equal(errors[0].message, | ||
@@ -54,0 +54,0 @@ "active value 13-06-24 does not match pattern " + ptn); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
3
75059
45
+ Addedasync@0.9.2(transitive)
+ Addedmoment@2.7.0(transitive)
- Removedasync@3.2.6(transitive)
- Removedmoment@2.30.1(transitive)
Updatedasync@~0.9.0
Updatedmoment@~2.7.0