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

Allow array values to be subject to validation rules #2

Closed
tmpfs opened this issue Jun 24, 2013 · 4 comments
Closed

Allow array values to be subject to validation rules #2

tmpfs opened this issue Jun 24, 2013 · 4 comments
Assignees

Comments

@tmpfs
Copy link
Owner

tmpfs commented Jun 24, 2013

This can already be done using the deep validation logic but it may be useful to validate each array entry with the same validation rule.

The typical use case would be when expecting an array whose values are all of the same type.

Something like:

{array:{type:"array", required: true, values:{type:"number"}}}
@ghost ghost assigned tmpfs Jun 24, 2013
@saransh2012
Copy link

Have you added this yet??

@tmpfs
Copy link
Owner Author

tmpfs commented Jul 17, 2013

No, hence this issue is still open.

@MarcosRava
Copy link
Collaborator

Any updates on this?

@tmpfs
Copy link
Owner Author

tmpfs commented Sep 12, 2015

Implemented in 0.4.8, see c02d5d3, 75997f3 and 3089416.

Test spec is here: https://github.com/freeformsystems/async-validate/blob/master/test/spec/array-values.js

Closing as implemented, create a new issue if you find a bug with this functionality.

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

No branches or pull requests

3 participants