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

Extender 'ignoreInValidationGroup' to guard observables from being added to validation groups #224

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

delixfe
Copy link
Contributor

@delixfe delixfe commented Feb 8, 2013

We show all errors in a list using ko.group's errors method. We have some observableArrays in the view model for which we created computeds filtering them. That caused validation messages to appear twice. The reason was that group's traverse (when using deep) follows each ko.observable and ko.computed inherits from observable.

Therefore I have added an knockout extender 'ignoreInValidationGroup'.
This extender can be used to flag a Knockout Observable to be ignored in validation groups.

When the extender is set the observable will not be added to validation groups.

Rules added to a flagged obserable still apply but the errors are not shown in any group.

delixfe and others added 3 commits December 3, 2012 03:05
Fixed line endings of "Localization/el-GR.js".
This extender can be used to flag a Knockout Observable to be ignored in validation groups.
When the extender is set the observable will not be added to validation groups.
Rules added to a flagged obserable still apply but the errors are not shown in any group.
@crissdev
Copy link
Member

This idea might be suited for #478

@crissdev
Copy link
Member

computeds are no longer resolved unless they have rules defined on them #501.

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

Successfully merging this pull request may close these issues.

None yet

2 participants