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: guard against null & undefined values in required method#2053

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

Merged

Conversation

Arkni
Copy link
Member

Copy link
Member

@staabmstaabm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Please add a test

@ArkniArkniforce-pushed therequired-method-null-undef-val branch 3 times, most recently froma8f6905 to92faa3bCompareSeptember 2, 2017 15:39
@Arkni
Copy link
MemberAuthor

I don't think there is a way to test it without using the normalizer. But the normalizer will not returnundefined ornull until#2054 was merged.

I will update the tests of the other PR and merge it and then update this one to use the normalizer.

For now, I added a description to the commit describing the needs for this fix.

@staabm
Copy link
Member

Merged the other pr, we can add the tests here

@ArkniArkniforce-pushed therequired-method-null-undef-val branch 2 times, most recently fromc43f371 to7b535efCompareSeptember 2, 2017 16:00
@Arkni
Copy link
MemberAuthor

We are good to go.

An input element will never have undefined or null as valuebut the normalizer may return null or undefined for an element.Also, jQuery (< 3.x) returns `null` for select element with themultiple attribute set if no options are selected.As a result, the required method should guard against that.
@ArkniArkniforce-pushed therequired-method-null-undef-val branch from7b535ef to83bfd48CompareSeptember 2, 2017 17:24
@Arkni
Copy link
MemberAuthor

I'm going to merge this for now.
Thanks for the review and for merging the other PR.

@ArkniArkni merged commitb7bb3c2 intojquery-validation:masterSep 2, 2017
@ArkniArkni deleted the required-method-null-undef-val branchSeptember 2, 2017 17:27
@staabm
Copy link
Member

staabm commentedSep 2, 2017
edited
Loading

Awesome that our normalizer layer also turned out to be a good value-mocking test utility 😸

Great job, thx

@Arkni
Copy link
MemberAuthor

Yes, and also I see (from Stackoverflow and here) that a lot of folks are using it and found it useful too.

Thanks :)

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

@staabmstaabmstaabm approved these changes

Assignees
No one assigned
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@Arkni@staabm

[8]ページ先頭

©2009-2025 Movatter.jp