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

Support for params to be an observable #363

Merged
merged 2 commits into from Nov 21, 2013

Conversation

warappa
Copy link
Contributor

@warappa warappa commented Nov 19, 2013

It was not possible to use observables for all validators, i.e. for the min rule. With this pull request the params object is first unwrapped before being passed to the validator method.

Only one test failed: Test 191, the error count in task-runner.htm as password and confirmPassword didn't raise an error. In my opinion this is correct as both values are undefined in the beginning. I added a required rule to confirmPassword to raise the required validation error.

Support observable params object i.e. for "min", "max" to be observable.

This change just calls unwrapObservable before invoking the validator
functions.

# Changed test-runner.htm: confirmPassword needs to be required to fire
error as both, password and confirmPassword, are initially undefined.
stevegreatrex added a commit that referenced this pull request Nov 21, 2013
Support for params to be an observable

Should also fix #138
@stevegreatrex stevegreatrex merged commit 055fe48 into Knockout-Contrib:master Nov 21, 2013
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

Successfully merging this pull request may close these issues.

None yet

2 participants