Skip to content

Commit

Permalink
Merge pull request #103 from cballou/patch-1
Browse files Browse the repository at this point in the history
Modified `FormValidator.prototype._validateField()` to support allowing custom messages.
  • Loading branch information
rickharrison committed Mar 14, 2014
2 parents e4830be + c302d90 commit b0dc79e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion validate.js
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@

if (failed) {
// Make sure we have a message for this rule
var source = this.messages[method] || defaults.messages[method],
var source = this.messages[field.name + '.' + method] || this.messages[method] || defaults.messages[method],
message = 'An error has occurred with the ' + field.display + ' field.';

if (source) {
Expand Down

0 comments on commit b0dc79e

Please sign in to comment.