浏览代码

#14, #57: Add message option to configurable html5 attributes

nghuuphuoc 11 年之前
父节点
当前提交
9848caf597
共有 4 个文件被更改,包括 5 次插入5 次删除
  1. 2 2
      demo/attribute.html
  2. 1 1
      dist/js/bootstrapValidator.js
  3. 1 1
      dist/js/bootstrapValidator.min.js
  4. 1 1
      src/js/validator/choice.js

+ 2 - 2
demo/attribute.html

@@ -109,7 +109,7 @@
                             <div class="col-lg-5">
                                 <div class="checkbox">
                                     <label>
-                                        <input type="checkbox" name="languages[]" value="english" data-bv-message="Invalid" /> English
+                                        <input type="checkbox" name="languages[]" value="english" data-bv-message="Please specify at least one language you can speak" /> English
                                     </label>
                                 </div>
                                 <div class="checkbox">
@@ -140,7 +140,7 @@
                             <div class="col-lg-5">
                                 <div class="checkbox">
                                     <label>
-                                        <input type="checkbox" name="programs[]" value="net" data-bv-choice="true" data-bv-choice-min="2" data-bv-choice-max="4" /> .Net
+                                        <input type="checkbox" name="programs[]" value="net" data-bv-choice="true" data-bv-choice-min="2" data-bv-choice-max="4" data-bv-choice-message="Please choose 2 - 4 programming languages you are good at" /> .Net
                                     </label>
                                 </div>
                                 <div class="checkbox">

+ 1 - 1
dist/js/bootstrapValidator.js

@@ -673,7 +673,7 @@
 }(window.jQuery));
 ;(function($) {
     $.fn.bootstrapValidator.validators.choice = {
-        html5Attributes: ['min', 'max'],
+        html5Attributes: ['message', 'min', 'max'],
 
         /**
          * Check if the number of checked boxes are less or more than a given number

文件差异内容过多而无法显示
+ 1 - 1
dist/js/bootstrapValidator.min.js


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

@@ -1,6 +1,6 @@
 (function($) {
     $.fn.bootstrapValidator.validators.choice = {
-        html5Attributes: ['min', 'max'],
+        html5Attributes: ['message', 'min', 'max'],
 
         /**
          * Check if the number of checked boxes are less or more than a given number