diff --git a/src/Field.js b/src/Field.js index 7eefce6..9533823 100644 --- a/src/Field.js +++ b/src/Field.js @@ -73,7 +73,8 @@ var Field = Concur.extend({ messages.push(kwargs.errorMessages) this.errorMessages = object.extend.apply(object, messages) - this.validators = this.defaultValidators.concat(kwargs.validators) + // Allow override the defaultValidators + this.validators = kwargs.validators || this.this.defaultValidators } }) @@ -192,4 +193,4 @@ Field.prototype._hasChanged = function(initial, data) { return (''+initialValue != ''+dataValue) // TODO is forcing to string necessary? } -module.exports = Field \ No newline at end of file +module.exports = Field