From 29cec8429194bb263053be5d8be7f18b859bb7ca Mon Sep 17 00:00:00 2001 From: Nicu Date: Thu, 17 Jan 2013 22:19:21 +0000 Subject: [PATCH] Added 'attrName' to the validation method --- model/validations/validations.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/model/validations/validations.js b/model/validations/validations.js index 92291a53..4f05b4ae 100644 --- a/model/validations/validations.js +++ b/model/validations/validations.js @@ -57,7 +57,7 @@ var validate = function(attrNames, options, proc) { self.validations[attrName] = []; } self.validations[attrName].push(function(){ - var res = proc.call(this, this[attrName]); + var res = proc.call(this, this[attrName], attrName); return res === undefined ? undefined : (options.message || res); }) });