Skip to content

netteForms.js: mimeType validator does not take action #173

Description

@dakur
  • bug report? no
  • feature request? yes
  • version: 2.4

Description

Even that Nette\Forms\Helpers::exportRules() generates rule for client-side mime type verification, it is not implemented in netteForms.js.

Steps To Reproduce

  1. Add control: $form->addUpload('image')->addRule(Form::MIME_TYPE, 'jen jpg', 'image/jpeg')
  2. Render control: <input n:name="image">
  3. Click the image input and select non-jpeg file.
  4. Click form's submit button. No client-side validation is made, instead backend takes action.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions