8000 required validator does not detect empty arrays, but empty File Lists · Issue #72 · gtournie/redux-form-validators · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
required validator does not detect empty arrays, but empty File Lists #72
Open
@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

      0