Skip to content

Commit 6db2536

Browse files
sparky672staabm
authored andcommitted
Entries: document onclick for select elements
When answering a question on StackOverflow about a broken `select` element, the OP had this option set to `false`. The `select` element was only being validated on focusout and on submit. Selecting items had no effect on validation message of this element. Removing this option, since it cannot be set to `true`, fixed the issue. Therefore, the documentation is incomplete. This option affects validation of `select` elements as well as radio and checkbox. https://jsfiddle.net/pu752c3a/
1 parent bda9cab commit 6db2536

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

entries/validate.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -272,10 +272,10 @@
272272
</property>
273273
<property name="onclick">
274274
<desc>
275-
Validate checkboxes and radio buttons on click. Set to false to disable.
275+
Validate checkboxes, radio buttons, and select elements on click. Set to false to disable.
276276
<p>Set to a Function to decide for yourself when to run validation.</p>
277277
<p>A boolean true is not a valid value.</p>
278-
<p><strong>Example</strong>: Disables onclick validation of checkboxes and radio buttons.</p>
278+
<p><strong>Example</strong>: Disables onclick validation of checkboxes, radio buttons, and select elements.</p>
279279
<pre><code>
280280
$("#myform").validate({
281281
onclick: false

0 commit comments

Comments
 (0)