Skip to content
Grav 2.0 is officially stable. Read the announcement →

Community guidelines

Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.

Forms & Blueprints

Validating filename of file field uploads

form

Started by Cameron Askin 8 years ago · 0 replies · 576 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 Ton Haarmans, 5 years ago
13 1135 4 months ago
Forms & Blueprints · by Hugo Oliveira, 5 months ago
0 61 5 months ago
Forms & Blueprints · by Flachy Joe, 6 months ago
9 134 6 months ago
Forms & Blueprints · by Augustus, 7 months ago
7 108 7 months ago
Forms & Blueprints · by Julien, 7 months ago
10 127 7 months ago