Skip to content
This repository has been archived by the owner on Dec 12, 2021. It is now read-only.

How to validate arrays and also make sure all array elements match specific criteria? #85

Closed
rightaway opened this issue Nov 6, 2015 · 1 comment

Comments

@rightaway
Copy link

Is there a way to validate arrays, to say something like the array must have between 3 and 5 elements? And then to validate within the array, to make sure that each of those 3 to 5 elements are email addresses, or numbers greater than 100?

@ansman
Copy link
Owner

ansman commented Nov 22, 2015

You can use the length validator for validating the number of items but you currently cannot validate the objects in the array with a single validation call, instead you'd have to validate each array object manually.

There is a ticket for better array support (#1) so I'm closing this for now.

@ansman ansman closed this as completed Nov 22, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants