Skip to content

Required validator does not work with file uploads #374

@juergenweb

Description

@juergenweb

The required rule does not check arrays. $_FILES is an array, so it would be great if it would be possible to add additional conditions to check first if a file array is present and if yes, wheter it is empty or not.
I know it will be more complex, because you cannot check if the array is empty, because $_FILES is never empty, so you have to check for 'size' or 'error' key.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions