Browse Source

#132: Use the message set in fields.[fieldName].message

nghuuphuoc 12 years ago
parent
commit
30fb08ef38

+ 1 - 1
dist/js/bootstrapValidator.js

@@ -210,7 +210,7 @@
                 $('<small/>')
                     .css('display', 'none')
                     .attr('data-bv-validator', validatorName)
-                    .html(this.options.fields[field].validators[validatorName].message || this.options.message)
+                    .html(this.options.fields[field].validators[validatorName].message || this.options.fields[field].message || this.options.message)
                     .addClass('help-block')
                     .appendTo($message);
             }

File diff suppressed because it is too large
+ 1 - 1
dist/js/bootstrapValidator.min.js


+ 1 - 1
src/js/bootstrapValidator.js

@@ -209,7 +209,7 @@
                 $('<small/>')
                     .css('display', 'none')
                     .attr('data-bv-validator', validatorName)
-                    .html(this.options.fields[field].validators[validatorName].message || this.options.message)
+                    .html(this.options.fields[field].validators[validatorName].message || this.options.fields[field].message || this.options.message)
                     .addClass('help-block')
                     .appendTo($message);
             }