0
Fork 0
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:
kirrg001 2017-12-14 01:15:12 +01:00
parent 11765351cc
commit 11a8245ca6

View file

@ -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);