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

Additional: max size and number of files#2087

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
Arkni merged 5 commits intojquery-validation:masterfromRobJohnston:file_max_size
Oct 8, 2017

Conversation

RobJohnston
Copy link
Contributor

This is a continuation of abandoned PR#1512, in that it validates the maximum size of a selected file.

Since the "file" type can contain the multiple attribute, another method was added to validate the maximum size of all selected files. Finally, a third method was added to validate the maximum number of files.

Copy link
Member

@ArkniArkni left a comment

Choose a reason for hiding this comment

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

Thanks for working on this.

Overall, it looks good to me. Only two small changes and we are good to go.

Thanks!


if ( $( element ).attr( "type" ) === "file" ) {
if ( element.files && element.files.length ) {
if ( element.files.length > param ) {
Copy link
Member

Choose a reason for hiding this comment

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

Can you please merge the above twoif blocks?

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

Which two? There are three of them. Lines 8 and 9, I presume?

Copy link
Member

Choose a reason for hiding this comment

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

Yes, 8 and 9.

@@ -0,0 +1,16 @@
//Limit the number of files in a FileList.
Copy link
Member

Choose a reason for hiding this comment

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

Just for consistency with the other comments in this project, can you add a space before the comment?
The same goes for other comments bellow.

@RobJohnston
Copy link
ContributorAuthor

@Arkni Done.

@ArkniArkni merged commit7e9e478 intojquery-validation:masterOct 8, 2017
@Arkni
Copy link
Member

Thanks a lot for your contribution :)

@RobJohnstonRobJohnston deleted the file_max_size branchOctober 8, 2017 20:27
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@ArkniArkniArkni approved these changes

Assignees
No one assigned
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

3 participants
@RobJohnston@Arkni@staabm

[8]ページ先頭

©2009-2025 Movatter.jp