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

Validate SelectionList structure more robustly #32

Open
makenosound opened this issue Mar 21, 2016 · 1 comment
Open

Validate SelectionList structure more robustly #32

makenosound opened this issue Mar 21, 2016 · 1 comment

Comments

@makenosound
Copy link
Contributor

At the moment we check that it’s an array of hashes. Ideally we’d be able to validate the structure of the hashes as well to ensure they’re well formed.

@solnic
Copy link
Contributor

solnic commented Mar 21, 2016

I know @timriley has discovered a bug in dry-types where you can't use a sum consisting of complex types like arrays with members. I investigated this and realized it's actually a missing feature - complex types (Array and Hash) don't support checking validity of an input, they only inherit the basic primitive type check. I'll make this work today/tomorrow so you'll be able to define a type for the selection list that precisely defines the constraints. I'll also try to improve exception so that it tells you more than just "foo violates constraints".

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

No branches or pull requests

2 participants