Skip to content

required validator does not detect empty arrays, but empty File Lists #72

@AndyOGo

Description

@AndyOGo

We have a multiple choice select list, which ends up being an array.

If it's value is an empty array [] I expect the !value.length check to match, but it is only applied for File Lists.

typeof value === 'string' ? !value.trim() : isFileList(value) && !isNaN(value.length) ? !value.length : !value

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