Skip to content

Support selecting into arrays #15

Description

@narthollis

It would be useful to be able to select into arrays, eg. people[].name or people[*].name to get an array of the contents all the name properties of objects in the people array.

I am currently working on a custom validator for yup that will need to read the the a name property from an object array to validate some other fields in the form. I have ideas on how to work around this, but it would be useful to be be able to simple to do this using a Ref

Activity

  1. jquense commented on Jan 28, 2021

    @jquense
    Owner

    hey there, I think that'd be beyond the scope of this library, I'm not necessarily against having yup ref's function like that, but we'd probably need higher confidence that it would be a useful behavior generally.

  2. narthollis commented on Jan 28, 2021

    @narthollis
    Author

    Would it be better for me to open this feature request in yup proper then?

    I opened it here after looking at how References worked and seeing they basically just delegated here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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