express-validator
Advanced tools
Comparing version 0.1.2 to 0.1.3
@@ -8,3 +8,3 @@ { | ||
], | ||
"version": "0.1.2", | ||
"version": "0.1.3", | ||
"homepage": "https://github.com/ctavan/express-validator", | ||
@@ -11,0 +11,0 @@ "repository": { |
@@ -17,3 +17,3 @@ # express-validator | ||
``` javascript | ||
```javascript | ||
var express = require('express'), | ||
@@ -67,4 +67,23 @@ expressValidator = require('express-validator'), | ||
You can extend the `Validator` and `Filter` objects to add custom validation | ||
and sanitization methods: | ||
```javascript | ||
var expressValidator = require('express-validator'); | ||
expressValidator.Filter.prototype.toLowerCase = function(){ | ||
this.modify(this.str.toLowerCase()); | ||
return this.str; | ||
}; | ||
``` | ||
## Changelog | ||
### v0.1.3 | ||
- Readme update | ||
### v0.1.2 | ||
- Expose Filter and Validator instances to allow adding custom methods | ||
### v0.1.1 | ||
@@ -71,0 +90,0 @@ - Use req.param() method to get parameter values instead of accessing |
6645
103