express-validator
Advanced tools
Comparing version 2.9.0 to 2.9.1
@@ -203,3 +203,3 @@ /* | ||
} | ||
return toCheck || ''; | ||
return req.headers && toCheck; | ||
}); | ||
@@ -206,0 +206,0 @@ |
@@ -11,3 +11,3 @@ { | ||
], | ||
"version": "2.9.0", | ||
"version": "2.9.1", | ||
"homepage": "https://github.com/ctavan/express-validator", | ||
@@ -14,0 +14,0 @@ "repository": { |
@@ -109,3 +109,3 @@ # express-validator | ||
The `customValidators` option can be used to add additional validation methods as needed. This option should be an `Object` defining the validator names and associated validation functions. | ||
The `customValidators` option can be used to add additional validation methods as needed. This option should be an `Object` defining the validator names and associated validation functions. | ||
@@ -119,7 +119,7 @@ Define your custom validators: | ||
return Array.isArray(value); | ||
}, | ||
}, | ||
gte: function(param, num) { | ||
return param >= num; | ||
} | ||
} | ||
} | ||
})); | ||
@@ -232,48 +232,8 @@ ``` | ||
You can add your own validators using the `customValidators` option. See [Middleware Options](#middleware-options) for usage details. | ||
You can add your own validators using the `customValidators` option. See [Middleware Options](#middleware-options) for usage details. | ||
## Changelog | ||
### v0.4.1 | ||
- Update this readme | ||
See [CHANGELOG.md](CHANGELOG.md) | ||
### v0.4.0 | ||
- Added `req.checkBody()` (@zero21xxx). | ||
- Upgraded validator dependency to 1.1.3 | ||
### v0.3.0 | ||
- `req.validationErrors()` now returns `null` instead of `false` if there are no errors. | ||
### v0.2.4 | ||
- Support for regex routes (@Cecchi) | ||
### v0.2.3 | ||
- Fix checkHeader() (@pimguilherme) | ||
### v0.2.2 | ||
- Add dot-notation for nested input (@sharonjl) | ||
- Add validate() alias for check() | ||
### v0.2.1 | ||
- Fix chaining validators (@rapee) | ||
### v0.2.0 | ||
- Added `validationErrors()` method (by @orfaust) | ||
- Added support for nested form fields (by @orfaust) | ||
- Added test cases | ||
### v0.1.3 | ||
- Readme update | ||
### v0.1.2 | ||
- Expose Filter and Validator instances to allow adding custom methods | ||
### v0.1.1 | ||
- Use req.param() method to get parameter values instead of accessing | ||
req.params directly. | ||
- Remove req.mixinParams() method. | ||
### v0.1.0 | ||
- Initial release | ||
## Contributors | ||
@@ -280,0 +240,0 @@ |
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
53412
20
246