ソースを参照

Update the file header

nghuuphuoc 12 年 前
コミット
ba85ea5f8c

+ 1 - 1
CHANGELOG.md

@@ -18,7 +18,7 @@
 * Added #21: Add ```callback``` validator
 * Added #24: Add ```live``` option
 * Fixed #25: The ```regexp``` validator does not work
-* Improved #22: Support form that labels are placed in extra small (col-xs-), small (col-sm-), medium (col-md-) elements
+* Improved #22: Support form that labels are placed in extra small (```col-xs-```), small (```col-sm-```), medium (```col-md-```) elements
 
 ## v0.1.1 (2013-10-17)
 

+ 2 - 2
dist/css/bootstrapValidator.css

@@ -3,8 +3,8 @@
  *
  * A jQuery plugin to validate form fields. Use with Bootstrap 3
  *
- * @author      Nguyen Huu Phuoc <phuoc@huuphuoc.me>
- * @copyright   (c) 2013 Nguyen Huu Phuoc
+ * @author      http://twitter.com/nghuuphuoc
+ * @copyright   (c) 2014 Nguyen Huu Phuoc
  * @license     MIT
  */
 .bootstrap-validator-form .help-block {

+ 2 - 2
dist/css/bootstrapValidator.scss

@@ -3,8 +3,8 @@
  *
  * A jQuery plugin to validate form fields. Use with Bootstrap 3
  *
- * @author      Nguyen Huu Phuoc <phuoc@huuphuoc.me>
- * @copyright   (c) 2013 Nguyen Huu Phuoc
+ * @author      http://twitter.com/nghuuphuoc
+ * @copyright   (c) 2014 Nguyen Huu Phuoc
  * @license     MIT
  */
 

+ 18 - 25
dist/js/bootstrapValidator.js

@@ -205,13 +205,6 @@
         },
 
         /**
-         * Validate the form
-         */
-        validate: function() {
-
-        },
-
-        /**
          * Validate given field
          *
          * @param {String} field The field name
@@ -306,7 +299,7 @@
          *
          * @param {jQuery} $field The field element
          * @param {String} validatorName
-         * @param {boolean} isValid
+         * @param {Boolean} isValid
          */
         completeRequest: function($field, validatorName, isValid) {
             if (isValid === false) {
@@ -336,7 +329,7 @@
         /**
          * Check the form validity
          *
-         * @returns {boolean}
+         * @returns {Boolean}
          */
         isValid: function() {
             if (this.numPendingRequests > 0) {
@@ -378,7 +371,7 @@
          * - max
          * - inclusive [optional]: Can be true or false. Default is true
          * - message: The invalid message
-         * @returns {boolean}
+         * @returns {Boolean}
          */
         validate: function(validator, $field, options) {
             var value = parseFloat($field.val());
@@ -402,7 +395,7 @@
          *          // validator is instance of BootstrapValidator
          *      }
          * - message: The invalid message
-         * @returns {boolean}
+         * @returns {Boolean}
          */
         validate: function(validator, $field, options) {
             var value = $field.val();
@@ -423,7 +416,7 @@
          * @param {jQuery} $field Field element
          * @param {Object} options Can consist of the following key:
          * - message: The invalid message
-         * @returns {boolean}
+         * @returns {Boolean}
          */
         validate: function(validator, $field, options) {
             var value = $field.val();
@@ -464,7 +457,7 @@
          * @param {jQuery} $field Field element
          * @param {Object} options Consists of the following key:
          * - field: The name of field that will be used to compare with current one
-         * @returns {boolean}
+         * @returns {Boolean}
          */
         validate: function(validator, $field, options) {
             var value        = $field.val(),
@@ -486,7 +479,7 @@
          * @param {BootstrapValidator} validator Validate plugin instance
          * @param {jQuery} $field Field element
          * @param {Object} options
-         * @returns {boolean}
+         * @returns {Boolean}
          */
         validate: function(validator, $field, options) {
             return /^\d+$/.test($field.val());
@@ -501,7 +494,7 @@
          * @param {BootstrapValidator} validator Validate plugin instance
          * @param {jQuery} $field Field element
          * @param {Object} options
-         * @returns {boolean}
+         * @returns {Boolean}
          */
         validate: function(validator, $field, options) {
             var value = $field.val(),
@@ -523,7 +516,7 @@
          * - value: The number used to compare to
          * - inclusive [optional]: Can be true or false. Default is true
          * - message: The invalid message
-         * @returns {boolean}
+         * @returns {Boolean}
          */
         validate: function(validator, $field, options) {
             var value = parseFloat($field.val());
@@ -540,7 +533,7 @@
          * @param {jQuery} $field Field element
          * @param {Object} options Can consist of the following keys:
          * - message: The invalid message
-         * @returns {boolean}
+         * @returns {Boolean}
          */
         validate: function(validator, $field, options) {
             var value = $field.val();
@@ -557,7 +550,7 @@
          * @param {jQuery} $field Field element
          * @param {Object} options Consists of the following key:
          * - field: The name of field that will be used to compare with current one
-         * @returns {boolean}
+         * @returns {Boolean}
          */
         validate: function(validator, $field, options) {
             var value        = $field.val(),
@@ -582,7 +575,7 @@
          * - value: The number used to compare to
          * - inclusive [optional]: Can be true or false. Default is true
          * - message: The invalid message
-         * @returns {boolean}
+         * @returns {Boolean}
          */
         validate: function(validator, $field, options) {
             var value = parseFloat($field.val());
@@ -598,7 +591,7 @@
          * @param {BootstrapValidator} validator The validator plugin instance
          * @param {jQuery} $field Field element
          * @param {Object} options
-         * @returns {boolean}
+         * @returns {Boolean}
          */
         validate: function(validator, $field, options) {
             var type = $field.attr('type');
@@ -615,7 +608,7 @@
          * @param {jQuery} $field Field element
          * @param {Object} options Consists of the following key:
          * - regexp: The regular expression you need to check
-         * @returns {boolean}
+         * @returns {Boolean}
          */
         validate: function(validator, $field, options) {
             var value = $field.val();
@@ -637,7 +630,7 @@
          *      <fieldName>: <fieldValue>
          *  }
          * - message: The invalid message
-         * @returns {string}
+         * @returns {String}
          */
         validate: function(validator, $field, options) {
             var value = $field.val(), name = $field.attr('name'), data = options.data;
@@ -671,7 +664,7 @@
          * - min
          * - max
          * At least one of two keys is required
-         * @returns {boolean}
+         * @returns {Boolean}
          */
         validate: function(validator, $field, options) {
             var value = $.trim($field.val()), length = value.length;
@@ -691,7 +684,7 @@
          * @param {BootstrapValidator} validator The validator plugin instance
          * @param {jQuery} $field Field element
          * @param {Object} options
-         * @returns {boolean}
+         * @returns {Boolean}
          */
         validate: function(validator, $field, options) {
             // Credit to https://gist.github.com/dperini/729294
@@ -779,7 +772,7 @@
          * @param {BootstrapValidator} validator The validator plugin instance
          * @param {jQuery} $field Field element
          * @param {Object} options
-         * @returns {boolean}
+         * @returns {Boolean}
          */
         validate: function(validateInstance, $field, options) {
             var value = $field.val();

ファイルの差分が大きいため隠しています
+ 1 - 1
dist/js/bootstrapValidator.min.js


+ 2 - 2
src/css/bootstrapValidator.css

@@ -3,8 +3,8 @@
  *
  * A jQuery plugin to validate form fields. Use with Bootstrap 3
  *
- * @author      Nguyen Huu Phuoc <phuoc@huuphuoc.me>
- * @copyright   (c) 2013 Nguyen Huu Phuoc
+ * @author      http://twitter.com/nghuuphuoc
+ * @copyright   (c) 2014 Nguyen Huu Phuoc
  * @license     MIT
  */
 .bootstrap-validator-form .help-block {

+ 2 - 2
src/css/bootstrapValidator.scss

@@ -3,8 +3,8 @@
  *
  * A jQuery plugin to validate form fields. Use with Bootstrap 3
  *
- * @author      Nguyen Huu Phuoc <phuoc@huuphuoc.me>
- * @copyright   (c) 2013 Nguyen Huu Phuoc
+ * @author      http://twitter.com/nghuuphuoc
+ * @copyright   (c) 2014 Nguyen Huu Phuoc
  * @license     MIT
  */
 

+ 4 - 11
src/js/bootstrapValidator.js

@@ -3,8 +3,8 @@
  *
  * A jQuery plugin to validate form fields. Use with Bootstrap 3
  *
- * @author      Nguyen Huu Phuoc <phuoc@huuphuoc.me>
- * @copyright   (c) 2013 Nguyen Huu Phuoc
+ * @author      http://twitter.com/nghuuphuoc
+ * @copyright   (c) 2014 Nguyen Huu Phuoc
  * @license     MIT
  */
 
@@ -205,13 +205,6 @@
         },
 
         /**
-         * Validate the form
-         */
-        validate: function() {
-
-        },
-
-        /**
          * Validate given field
          *
          * @param {String} field The field name
@@ -306,7 +299,7 @@
          *
          * @param {jQuery} $field The field element
          * @param {String} validatorName
-         * @param {boolean} isValid
+         * @param {Boolean} isValid
          */
         completeRequest: function($field, validatorName, isValid) {
             if (isValid === false) {
@@ -336,7 +329,7 @@
         /**
          * Check the form validity
          *
-         * @returns {boolean}
+         * @returns {Boolean}
          */
         isValid: function() {
             if (this.numPendingRequests > 0) {

+ 1 - 1
src/js/validator/between.js

@@ -10,7 +10,7 @@
          * - max
          * - inclusive [optional]: Can be true or false. Default is true
          * - message: The invalid message
-         * @returns {boolean}
+         * @returns {Boolean}
          */
         validate: function(validator, $field, options) {
             var value = parseFloat($field.val());

+ 1 - 1
src/js/validator/callback.js

@@ -12,7 +12,7 @@
          *          // validator is instance of BootstrapValidator
          *      }
          * - message: The invalid message
-         * @returns {boolean}
+         * @returns {Boolean}
          */
         validate: function(validator, $field, options) {
             var value = $field.val();

+ 1 - 1
src/js/validator/creditCard.js

@@ -8,7 +8,7 @@
          * @param {jQuery} $field Field element
          * @param {Object} options Can consist of the following key:
          * - message: The invalid message
-         * @returns {boolean}
+         * @returns {Boolean}
          */
         validate: function(validator, $field, options) {
             var value = $field.val();

+ 1 - 1
src/js/validator/different.js

@@ -7,7 +7,7 @@
          * @param {jQuery} $field Field element
          * @param {Object} options Consists of the following key:
          * - field: The name of field that will be used to compare with current one
-         * @returns {boolean}
+         * @returns {Boolean}
          */
         validate: function(validator, $field, options) {
             var value        = $field.val(),

+ 1 - 1
src/js/validator/digits.js

@@ -6,7 +6,7 @@
          * @param {BootstrapValidator} validator Validate plugin instance
          * @param {jQuery} $field Field element
          * @param {Object} options
-         * @returns {boolean}
+         * @returns {Boolean}
          */
         validate: function(validator, $field, options) {
             return /^\d+$/.test($field.val());

+ 1 - 1
src/js/validator/emailAddress.js

@@ -6,7 +6,7 @@
          * @param {BootstrapValidator} validator Validate plugin instance
          * @param {jQuery} $field Field element
          * @param {Object} options
-         * @returns {boolean}
+         * @returns {Boolean}
          */
         validate: function(validator, $field, options) {
             var value = $field.val(),

+ 1 - 1
src/js/validator/greaterThan.js

@@ -9,7 +9,7 @@
          * - value: The number used to compare to
          * - inclusive [optional]: Can be true or false. Default is true
          * - message: The invalid message
-         * @returns {boolean}
+         * @returns {Boolean}
          */
         validate: function(validator, $field, options) {
             var value = parseFloat($field.val());

+ 1 - 1
src/js/validator/hexColor.js

@@ -7,7 +7,7 @@
          * @param {jQuery} $field Field element
          * @param {Object} options Can consist of the following keys:
          * - message: The invalid message
-         * @returns {boolean}
+         * @returns {Boolean}
          */
         validate: function(validator, $field, options) {
             var value = $field.val();

+ 1 - 1
src/js/validator/identical.js

@@ -7,7 +7,7 @@
          * @param {jQuery} $field Field element
          * @param {Object} options Consists of the following key:
          * - field: The name of field that will be used to compare with current one
-         * @returns {boolean}
+         * @returns {Boolean}
          */
         validate: function(validator, $field, options) {
             var value        = $field.val(),

+ 1 - 1
src/js/validator/lessThan.js

@@ -9,7 +9,7 @@
          * - value: The number used to compare to
          * - inclusive [optional]: Can be true or false. Default is true
          * - message: The invalid message
-         * @returns {boolean}
+         * @returns {Boolean}
          */
         validate: function(validator, $field, options) {
             var value = parseFloat($field.val());

+ 1 - 1
src/js/validator/notEmpty.js

@@ -6,7 +6,7 @@
          * @param {BootstrapValidator} validator The validator plugin instance
          * @param {jQuery} $field Field element
          * @param {Object} options
-         * @returns {boolean}
+         * @returns {Boolean}
          */
         validate: function(validator, $field, options) {
             var type = $field.attr('type');

+ 1 - 1
src/js/validator/regexp.js

@@ -7,7 +7,7 @@
          * @param {jQuery} $field Field element
          * @param {Object} options Consists of the following key:
          * - regexp: The regular expression you need to check
-         * @returns {boolean}
+         * @returns {Boolean}
          */
         validate: function(validator, $field, options) {
             var value = $field.val();

+ 1 - 1
src/js/validator/remote.js

@@ -12,7 +12,7 @@
          *      <fieldName>: <fieldValue>
          *  }
          * - message: The invalid message
-         * @returns {string}
+         * @returns {String}
          */
         validate: function(validator, $field, options) {
             var value = $field.val(), name = $field.attr('name'), data = options.data;

+ 1 - 1
src/js/validator/stringLength.js

@@ -9,7 +9,7 @@
          * - min
          * - max
          * At least one of two keys is required
-         * @returns {boolean}
+         * @returns {Boolean}
          */
         validate: function(validator, $field, options) {
             var value = $.trim($field.val()), length = value.length;

+ 1 - 1
src/js/validator/uri.js

@@ -6,7 +6,7 @@
          * @param {BootstrapValidator} validator The validator plugin instance
          * @param {jQuery} $field Field element
          * @param {Object} options
-         * @returns {boolean}
+         * @returns {Boolean}
          */
         validate: function(validator, $field, options) {
             // Credit to https://gist.github.com/dperini/729294

+ 1 - 1
src/js/validator/usZipCode.js

@@ -6,7 +6,7 @@
          * @param {BootstrapValidator} validator The validator plugin instance
          * @param {jQuery} $field Field element
          * @param {Object} options
-         * @returns {boolean}
+         * @returns {Boolean}
          */
         validate: function(validateInstance, $field, options) {
             var value = $field.val();