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

Validator: method validatePattern() check FileUpload and use right name #175

Merged
merged 1 commit into from Feb 25, 2018

Conversation

@h4kuna
Copy link
Contributor

h4kuna commented Feb 23, 2018

  • bug fix? yes issue
  • new feature? no
  • BC break? no
  • doc PR: nette/docs#??? not necessary

Validator accept pattern for FileUpload::getName() instance of FileUplaod::__toString(), where is tmpName.

$form->addUpload('csv')
    ->addRule($form::MIME_TYPE, 'Foo', 'text/*')
    ->addRule($form::PATTERN, 'Message', '.*\.csv');
@dg

This comment has been minimized.

Copy link
Member

dg commented Feb 25, 2018

Thanks.

@dg dg merged commit 29944fd into nette:master Feb 25, 2018
2 checks passed
2 checks passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
coverage/coveralls Coverage increased (+0.003%) to 94.923%
Details
dg added a commit that referenced this pull request Feb 25, 2018
dg added a commit that referenced this pull request Feb 25, 2018
dg added a commit that referenced this pull request Feb 28, 2018
dg added a commit that referenced this pull request Feb 28, 2018
renekliment added a commit to renekliment/forms that referenced this pull request Jul 25, 2018
…5 File API

* this is a complement to nette#175 so validating file names via pattern works on both client and server
dg added a commit that referenced this pull request Jul 25, 2018
…5 File API (#186)

* this is a complement to #175 so validating file names via pattern works on both client and server
dg added a commit that referenced this pull request Jul 25, 2018
…5 File API (#186)

* this is a complement to #175 so validating file names via pattern works on both client and server
renekliment added a commit to renekliment/nette-docs that referenced this pull request Aug 22, 2018
dg added a commit to nette/docs that referenced this pull request Aug 22, 2018
dg added a commit to nette/docs that referenced this pull request Aug 22, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.