ソースを参照

#12: notEmpty validator must support radio elements

phuoc 12 年 前
コミット
07bacd835a
2 ファイル変更2 行追加2 行削除
  1. 1 1
      README.md
  2. 1 1
      src/js/bootstrapvalidate.js

+ 1 - 1
README.md

@@ -67,7 +67,7 @@ Below is the list of built-in validators sorted in alphabetical order:
 
 Validator name                            | Description
 ------------------------------------------|------------
-[between](docs/between/README.md)         | Checks if the input value is between (strictly or not) two given numbers
+[between](docs/between)                   | Checks if the input value is between (strictly or not) two given numbers
 digits                                    | Return true if the value contains only digits
 emailAddress                              | Validate an email address
 greaterThan                               | Return true if the value is greater than or equals to given number

+ 1 - 1
src/js/bootstrapvalidate.js

@@ -79,7 +79,7 @@
                 var that         = this,
                     fieldElement = $(foundFields[0]),
                     type         = $(fieldElement).attr('type'),
-                    event        = ('checkbox' == type) ? 'change' : 'keyup';
+                    event        = ('checkbox' == type || 'radio' == type) ? 'change' : 'keyup';
 
                 $(fieldElement)
                     .on(event, function() {