Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for :array option in Pastore::Params #2

Open
serioja90 opened this issue Feb 22, 2023 · 0 comments
Open

Add support for :array option in Pastore::Params #2

serioja90 opened this issue Feb 22, 2023 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@serioja90
Copy link
Contributor

It would be nice to have the possibility to validate arrays of specific type (e.g. param :status, type: :string, array: true, in: ['draft', 'active', 'inactive', 'expired']).

The option :array will indicate that the param is an array, so should be treated as array.

If a single value is passed, like status=draft, it should be automatically converted to an array of strings and then validated.

For array inputs the :in option should check if all the values in array respect the inclusion requirement.

@serioja90 serioja90 added the enhancement New feature or request label Feb 22, 2023
@serioja90 serioja90 self-assigned this Feb 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant