Skip to content
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

Usage of rule Form::MAX_POST_SIZE leads to MemberAccessException #89

Closed
janedbal opened this issue Aug 4, 2015 · 3 comments
Closed

Comments

@janedbal
Copy link

janedbal commented Aug 4, 2015

Following rule leads to Nette\MemberAccessException: Call to undefined static method Nette\Forms\Validator::validatemaxPostSize()..

$form->addUpload('test', 'Test')
     ->addRule(Form::MAX_POST_SIZE, NULL, 1024);

Related: #30

@dg
Copy link
Member

dg commented Aug 4, 2015

Use MAX_FILE_SIZE

@dg dg closed this as completed Aug 4, 2015
@janedbal
Copy link
Author

janedbal commented Aug 4, 2015

So there is currently (due to #30) no way to check uploaded size of all files? Form::MAX_FILE_SIZE checks size per-file, but when I use multiple upload, I cannot check total size by any rule?

@dg
Copy link
Member

dg commented Aug 4, 2015

Unfortunately no, you can check maximal count of files and maximal size of file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants