New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Core: Add capability to check array of inputs #2431
base: master
Are you sure you want to change the base?
Conversation
What's the checkbox/radio check for? Does it display error messages correctly? |
The reason of filtering out radios and checkboxes is that when you have multiple radio buttons or checkboxes with same name, I believe user really expecting only one of then to be selected instead all of them have to be selected. So for those 2 types of inputs, they fall back to the original program logic thus error message should display correctly. |
Hi, just wondering if everything look good to be merged in? |
This issue/proposal has been automatically marked as idle and stale because it hasn't had any recent activity. It will be automatically closed if no further activity occurs. If you think this is wrong, or the problem still persists, just pop a reply in the comments and one of the maintainers will (try!) to follow up. |
@@ -454,7 +454,16 @@ $.extend( $.validator, { | |||
checkForm: function() { | |||
this.prepareForm(); | |||
for ( var i = 0, elements = ( this.currentElements = this.elements() ); elements[ i ]; i++ ) { | |||
this.check( elements[ i ] ); | |||
var toBeChecked = this.findByName( elements[ i ].name ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had to replace that line by:
var toBeChecked = this.findByName( elements[ i ].name ); | |
var toBeChecked = this.findByName( elements[ i ].name ).not( this.settings.ignore ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please fix the requested change
Description
Add capability to check array of inputs.
Basically a copy & paste code from #2000 with checkbox/radio check