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

Change validate() to return value via callback #250

Closed
hueniverse opened this issue Apr 15, 2014 · 0 comments
Closed

Change validate() to return value via callback #250

hueniverse opened this issue Apr 15, 2014 · 0 comments
Assignees
Labels
breaking changes Change that can breaking existing code
Milestone

Comments

@hueniverse
Copy link
Contributor

The current API is problematic because it can only return an error. Most of the bugs around partial modification of the value passed (alternatives, objects) are due to the fact that the same value passed is directly manipulated. Instead, we need to keep the inputs constant and generate a new object value which is the modified copy. To do this, we need to change the return values to include the error and modified value.

The main breaking change here isn't the interface but the fact that the value input is now constant and the converted/modified value is returned from the function via the callback.

This issue only changes the API. Another will add the value to the callback.

This also removed the undocumented validateCallback() methods.

@hueniverse hueniverse added this to the 4.0.0 milestone Apr 15, 2014
@hueniverse hueniverse self-assigned this Apr 15, 2014
@lock lock bot locked as resolved and limited conversation to collaborators Jan 10, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
breaking changes Change that can breaking existing code
Projects
None yet
Development

No branches or pull requests

1 participant