Filename
Checks for valid filenames
-
return (boolean)
In your code
if(v::filename('myfile.jpg')) {
echo 'Yay, valid!';
}
In fields
fields:
example:
label: Example field
type: text
validate: filename
Checks for valid filenames
if(v::filename('myfile.jpg')) {
echo 'Yay, valid!';
}
fields:
example:
label: Example field
type: text
validate: filename