Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author doublesharp

    (@doublesharp)

    Hi @nimsrules – the regular expression just filters the $value from the field, so it’s possible that this is the ID for a field type (I don’t have any set up and have been tied up with work lately). You might try using the PHP validation and using some error_log() writes to see what values you have available – I’m pretty sure you can get the name from $_POST or $_FILES if all else fails.

    If you want to test your regex pattern, http://www.regex101.com is great for seeing what does and doesn’t match you pattern as well as catching errors.

    I’ll leave this open for now until I have a chance to check it out.

    Thanks!

    Plugin Author doublesharp

    (@doublesharp)

    Hi @nimsrules,

    ACF5 supports filtering upload by file type in the Field Group configuration so I am marking this as resolved, thanks!

    Allowed file types
    Comma separated list. Leave blank for all types

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Validation for file type’ is closed to new replies.