Skip to content
● Grav 2.2 is out: 2x faster cold starts and 96% less memory on big sites. Read the announcement →

Validating filename of file field uploads

form

Started by Cameron Askin 8 years ago · 0 replies · 795 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 Japhy, 3 hours ago
0 12 3 hours ago
Forms & Blueprints · by FrViPofm, 3 weeks ago
5 274 2 weeks ago
Forms & Blueprints · by Ton Haarmans, 6 years ago
13 2265 8 months ago
Forms & Blueprints · by Hugo Oliveira, 9 months ago
0 729 9 months ago
Forms & Blueprints · by Flachy Joe, 10 months ago
9 810 10 months ago