statamic / workshop

Create and edit entries, pages, and globals on the front-end of your site without the control panel.
https://statamic.com/marketplace/addons/workshop
3 stars 2 forks source link

Validation for filename extensions doesn't seem to work #26

Open dannyuk1982 opened 5 years ago

dannyuk1982 commented 5 years ago

Describe the bug Validation for filename extensions for type assets don't seem to work

To Reproduce

  1. Add a validate line to an assets field, i.e.

    container: main
    folder: listings/thumbnails
    restrict: true
    max_files: 1
    type: assets
    validate: "ext:jpg,gif"
  2. Select a valid file, i.e. ending in .jpg

  3. Submit the Workshop form

Expected behavior I expect the file to be accepted and saved

Actual behavior An error occurs The Thumbnail must be a file of type: jpg, gif and the image is not saved. Removing the validate line is needed for the image to upload - which is of no use.

Environment details (please complete the following information):