dandean/express-form — pull request #29 by spang (2012-01-30 02:32:33+00:00)
Title: add isDate validator

I'm using express-form and I found that this is a validator I need. Adding support is easy since it's already a part of node-validator.

I added tests as well, but I can't verify that they work since something else is, as far as I can tell, breaking the test runner.

I get the following (using 'nodeunit' is just a guess, I'm new to node and have no idea what to run tests with):

spang@sencha:~/src/express-form> nodeunit test/form.test.js

form.test.js
✖ form : isValid

AssertionError: 'Missing expected exception..' undefined undefined
at Function._throws (assert.js:301:5)
at Function.throws (assert.js:318:11)
at Object. (/home/spang/src/express-form/test/form.test.js:17:20)
at Object. (/usr/local/lib/nodejs/nodeunit/lib/core.js:233:16)
at /usr/local/lib/nodejs/nodeunit/lib/core.js:233:16
at Object.runTest (/usr/local/lib/nodejs/nodeunit/lib/core.js:69:9)
at /usr/local/lib/nodejs/nodeunit/lib/core.js:115:25
at /usr/local/lib/nodejs/nodeunit/deps/async.js:508:13
at /usr/local/lib/nodejs/nodeunit/deps/async.js:118:13
at /usr/local/lib/nodejs/nodeunit/deps/async.js:134:9

FAILURES: Undone tests (or their setups/teardowns):
- form : getErrors