Browse Source

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

nghuuphuoc 11 years ago
parent
commit
9848caf597

+ 2 - 2
demo/attribute.html

@@ -109,7 +109,7 @@
                             <div class="col-lg-5">
                             <div class="col-lg-5">
                                 <div class="checkbox">
                                 <div class="checkbox">
                                     <label>
                                     <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>
                                     </label>
                                 </div>
                                 </div>
                                 <div class="checkbox">
                                 <div class="checkbox">
@@ -140,7 +140,7 @@
                             <div class="col-lg-5">
                             <div class="col-lg-5">
                                 <div class="checkbox">
                                 <div class="checkbox">
                                     <label>
                                     <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>
                                     </label>
                                 </div>
                                 </div>
                                 <div class="checkbox">
                                 <div class="checkbox">

+ 1 - 1
dist/js/bootstrapValidator.js

@@ -673,7 +673,7 @@
 }(window.jQuery));
 }(window.jQuery));
 ;(function($) {
 ;(function($) {
     $.fn.bootstrapValidator.validators.choice = {
     $.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
          * Check if the number of checked boxes are less or more than a given number

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


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

@@ -1,6 +1,6 @@
 (function($) {
 (function($) {
     $.fn.bootstrapValidator.validators.choice = {
     $.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
          * Check if the number of checked boxes are less or more than a given number