Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Core: Add capability to check array of inputs#2431

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Closed
ridea-co wants to merge1 commit intojquery-validation:masterfromridea-co:master

Conversation

ridea-co
Copy link

Description

Add capability to check array of inputs.
Basically a copy & paste code from#2000 with checkbox/radio check

@bytestream
Copy link
Member

bytestream commentedJul 1, 2022
edited
Loading

What's the checkbox/radio check for?

Does it display error messages correctly?

@bytestreambytestream linked an issueJul 1, 2022 that may beclosed by this pull request
@ridea-co
Copy link
Author

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.

@ridea-co
Copy link
Author

Hi, just wondering if everything look good to be merged in?

@github-actions
Copy link

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.
Thank you for contributing :)

@github-actionsgithub-actionsbot added the staleUsed to mark stale issues labelSep 4, 2022
@bytestreambytestream added NEEDS REVIEW and removed staleUsed to mark stale issues labelsSep 5, 2022
@@ -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 );

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:

Suggested change
vartoBeChecked=this.findByName(elements[i].name);
vartoBeChecked=this.findByName(elements[i].name).not(this.settings.ignore);

Copy link

@Seb33300Seb33300 left a 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

@bytestream
Copy link
Member

Closing in favor of#2498 - please comment on that PR if it doesn't work / match the behaviour of this PR.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@Seb33300Seb33300Seb33300 requested changes

Assignees
No one assigned
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

Error in not validating array's of inputs correctly.
3 participants
@ridea-co@bytestream@Seb33300

[8]ページ先頭

©2009-2025 Movatter.jp