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

coerce #13

Open
dvv opened this issue Jan 8, 2011 · 2 comments
Open

coerce #13

dvv opened this issue Jan 8, 2011 · 2 comments

Comments

@dvv
Copy link
Contributor

dvv commented Jan 8, 2011

Hi!

Wouldn't it be better to apply coercion (if defined in the schema and available in exports) only if the value hadn't passed type test, and not unconditionally?

Best regards,
--Vladimir

@kriszyp
Copy link
Owner

kriszyp commented Jan 14, 2011

This is fixed in your pull, right?

@dvv
Copy link
Contributor Author

dvv commented Jan 14, 2011

Not really. I didn't get how to achieve that. In pull I added support to validate objects in arrays, plus changed validate() signature to support options hash (since a bunch of options are added).

I introduced existingOnly option which control whether only existing in instance properties will be validating (very useful for validating partial updates), and filter option which controls whether non-specified in the schema properties should add errors when additionalProperties is false (this is useful to validate only a subset of instance properties)

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