andreypopp / validated

Validate your configurations with precise error messages
91 stars 14 forks source link

Question: array/arrayOf type might be more common than `sequence` #9

Closed andywer closed 7 years ago

andywer commented 7 years ago

Hi @andreypopp!

I like the idea behind validated. I tend to compare it to React's PropTypes, so I just wondered why it's called sequence (which is also not a common term in JS land).

An arrayOf(person) might be more intuitive.

Cheers

andreypopp commented 7 years ago

Yep, I think this is a good idea. Submit a PR! We can leave old name but remove it form the docs to keep it b/c.

andywer commented 7 years ago

Hey @andreypopp. I just stumbled upon a minor issue:

You can use sequence() without specifying a type and syntactically this makes sense. But if it's now arrayOf() is does not look correct if you omit the array item type.

Suggestion: I change sequence() to arrayOf(any) in the examples.