mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-03-11 02:12:21 -05:00
Added TODO to core/server/data/validation/index.js
no issue - we are modifying the global validator dependency, which is bad - see https://github.com/chriso/validator.js/issues/525#issuecomment-213149570 - we should create our own class and expose a singleton for the whole Ghost project
This commit is contained in:
parent
11765351cc
commit
11a8245ca6
1 changed files with 1 additions and 0 deletions
|
@ -52,6 +52,7 @@ function characterOccurance(stringToTest) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// extends has been removed in validator >= 5.0.0, need to monkey-patch it back in
|
// extends has been removed in validator >= 5.0.0, need to monkey-patch it back in
|
||||||
|
// @TODO: We modify the global validator dependency here! https://github.com/chriso/validator.js/issues/525#issuecomment-213149570
|
||||||
validator.extend = function (name, fn) {
|
validator.extend = function (name, fn) {
|
||||||
validator[name] = function () {
|
validator[name] = function () {
|
||||||
var args = Array.prototype.slice.call(arguments);
|
var args = Array.prototype.slice.call(arguments);
|
||||||
|
|
Loading…
Add table
Reference in a new issue