Browse Source

API: Rename getErrors() to getMessages()

nghuuphuoc 11 years ago
parent
commit
bd839cef30

+ 1 - 1
demo/container4.html

@@ -165,7 +165,7 @@ $(document).ready(function() {
         })
         .on('error.field.bv', function(e, data) {
             var $form    = $(e.target),
-                messages = $form.data('bootstrapValidator').getErrors(data.element);
+                messages = $form.data('bootstrapValidator').getMessages(data.element);
             $('#errors').find('li[data-bv-for="' + data.field + '"]').remove();
             for (var i in messages) {
                 $('<li/>').attr('data-bv-for', data.field).html(messages[i]).appendTo('#errors');

+ 1 - 1
dist/css/bootstrapValidator.min.css

@@ -2,7 +2,7 @@
  * BootstrapValidator (http://bootstrapvalidator.com)
  * The best jQuery plugin to validate form fields. Designed to use with Bootstrap 3
  *
- * @version     v0.5.0-dev, built on 2014-06-26 6:56:31 PM
+ * @version     v0.5.0-dev, built on 2014-06-27 8:37:01 AM
  * @author      https://twitter.com/nghuuphuoc
  * @copyright   (c) 2013 - 2014 Nguyen Huu Phuoc
  * @license     MIT

+ 2 - 2
dist/js/bootstrapValidator.js

@@ -2,7 +2,7 @@
  * BootstrapValidator (http://bootstrapvalidator.com)
  * The best jQuery plugin to validate form fields. Designed to use with Bootstrap 3
  *
- * @version     v0.5.0-dev, built on 2014-06-26 6:56:31 PM
+ * @version     v0.5.0-dev, built on 2014-06-27 8:37:01 AM
  * @author      https://twitter.com/nghuuphuoc
  * @copyright   (c) 2013 - 2014 Nguyen Huu Phuoc
  * @license     MIT
@@ -1060,7 +1060,7 @@
          * If the field is not defined, the method returns all error messages of all fields
          * @returns {String[]}
          */
-        getErrors: function(field) {
+        getMessages: function(field) {
             var that     = this,
                 messages = [],
                 $fields  = $([]);

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


+ 1 - 1
src/js/bootstrapValidator.js

@@ -1059,7 +1059,7 @@
          * If the field is not defined, the method returns all error messages of all fields
          * @returns {String[]}
          */
-        getErrors: function(field) {
+        getMessages: function(field) {
             var that     = this,
                 messages = [],
                 $fields  = $([]);