This project is no longer maintained and no further public releases are planned.

No further support will be given.

Feel free to fork the git repository.

fileAllowedTypes

Checks if the filetype of an uploaded file is allowed.

Version added

1.0.0

Important

This error check is mandatory, if you have a file upload field in your form. However, if you want to allow any file extension to be uploaded, add the error check with empty "allowedTypes" as shown in the example code.

Example code

# image file possible
errorChecks {
  1 = fileAllowedTypes
  1 {
     allowedTypes = jpg,gif,png
  }
}

#any file possible:
errorChecks {
  1 = fileAllowedTypes
  1 {
     allowedTypes = 
  }
}

Properties

.allowedTypes

Data type

Comma separated list | cObj

Version added

1.0.0