Skip to content
● Meet Grav Guard: keep every Grav site you run secure and up to date, all from one place. Free for up to 3 sites. Read more →

Validating filename of file field uploads

form

Started by Cameron Askin 8 years ago · 0 replies · 900 views
8 years ago

Hi, I was wondering if it is currently possible to validate the filenames of images/files uploaded in the admin?

For example: a regex pattern to reject file uploads with filenames that have spaces or capital letters.
I know you can add patterns for text fields etc but I can't work out how to validate the filename specifically.

Alternatively, is there a setting (or a plugin) which automatically converts the file name to lowercase + hyphenize on upload?

Suggested topics

Topic Participants Replies Views Activity
Forms & Blueprints · by Anna, 2 days ago
2 53 16 hours ago
Forms & Blueprints · by Anna, 3 days ago
7 82 16 hours ago
Forms & Blueprints · by Anna, 1 week ago
5 186 6 days ago
Forms & Blueprints · by TomW, 1 month ago
3 379 1 month ago
Forms & Blueprints · by Japhy, 2 months ago
2 595 2 months ago