express-form
Advanced tools
Comparing version 0.7.0 to 0.7.1
# express-form changelog | ||
## 0.7.0 (2013/02/13) | ||
## v0.8.0 (2013/02/16) | ||
* use express 3.x for peer and dev dependencies | ||
## v0.7.1 (2013/02/16) | ||
* use express 2.x as peer dependency | ||
## v0.7.0 (2013/02/13) | ||
* add express 3.x support | ||
@@ -5,0 +11,0 @@ * add express as peer dependency |
@@ -5,11 +5,12 @@ { | ||
"description": "Form validation and data filtering for Express", | ||
"version": "0.7.0", | ||
"version": "0.7.1", | ||
"homepage": "http://dandean.github.com/express-form", | ||
"repository": { | ||
"type": "git", | ||
"url": "git://github.com/dandean/express-form.git" | ||
"url": "git://github.com/freewil/express-form.git" | ||
}, | ||
"contributors": [ | ||
"Marc Harter <wavded@gmail.com>", | ||
"Sugarstack <@sugarstack>" | ||
"Sugarstack <@sugarstack>", | ||
"Sean Lavine <sean@eternalrise.com>" | ||
], | ||
@@ -27,10 +28,11 @@ "keywords": [ | ||
"peerDependencies": { | ||
"express": "*" | ||
"express": "2.x" | ||
}, | ||
"devDependencies": { | ||
"expresso": "~0.9.2" | ||
"expresso": "~0.9.2", | ||
"express": "2.x" | ||
}, | ||
"main": "index", | ||
"bugs": { | ||
"url": "http://github.com/dandean/express-form/issues" | ||
"url": "http://github.com/freewil/express-form/issues" | ||
}, | ||
@@ -46,5 +48,5 @@ "scripts": { | ||
"type": "MIT", | ||
"url": "http://github.com/dandean/express-form/raw/master/LICENSE" | ||
"url": "http://github.com/freewil/express-form/raw/master/LICENSE" | ||
} | ||
] | ||
} |
Express Form provides data filtering and validation as route middleware to your Express applications. | ||
[![Build Status](https://travis-ci.org/freewil/express-form.png?branch=master)](https://travis-ci.org/freewil/express-form) | ||
[![Build Status](https://travis-ci.org/freewil/express-form.png?branch=express-2.x)](https://travis-ci.org/freewil/express-form) | ||
**express 2.x: use express-form 0.7.x** | ||
**express 3.x: use express-form 0.8.x** | ||
Usage: | ||
@@ -124,3 +128,8 @@ ------ | ||
**Validation messages**: each validator has its own default validation message. These can easily be overridden at runtime by passing a custom validation message to the validator. The custom message is always the **last** argument passed to the validator. | ||
**Validation messages**: each validator has its own default validation message. | ||
These can easily be overridden at runtime by passing a custom validation message | ||
to the validator. The custom message is always the **last** argument passed to | ||
the validator. `required()` allows you to set a placeholder (or default value) | ||
that your form contains when originally presented to the user. This prevents the | ||
placeholder value from passing the `required()` check. | ||
@@ -132,6 +141,6 @@ Use "%s" in the message to have the field name or label printed in the message: | ||
validate("username").required("What is your %s?") | ||
validate("username").required("Type your desired username", "What is your %s?") | ||
// -> "What is your username?" | ||
validate("username", "Username").required("What is your %s?") | ||
validate("username", "Username").required("", "What is your %s?") | ||
// -> "What is your Username?" | ||
@@ -138,0 +147,0 @@ |
@@ -6,7 +6,18 @@ var assert = require("assert"), | ||
express = require("express"), | ||
app = express.createServer(); | ||
http = require("http"), | ||
app = express(); | ||
http.createServer(app).listen(3000); | ||
// some duct-tape to make assert.response work with express 3.x | ||
app.address = function() { | ||
return {port: 3000}; | ||
}; | ||
app.close = function() { | ||
process.exit(0); | ||
}; | ||
app.configure(function() { | ||
app.use(express.bodyParser()); | ||
app.use(app.router); | ||
}); | ||
@@ -13,0 +24,0 @@ |
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
70034
1538
357
2
1