Skip to content

Async result still applied even when condition changed to false #549

Description

@lostincomputer

The result of async rule is still being applied even when the condition has changed to false. This causes Knockout Validation to mark the observable as invalid even when it should be valid.

Timeline:

  1. Observable is set to an invalid value.
  2. Rule's condition is set to true.
  3. Knockout Validation runs the async rule.
  4. Rule's condition is changed to false
  5. Async rule finishes and calls callback(false)
  6. observables.isValid is false when it should be true!

Same problem occurs if the observable's value changes before the async rule finishes.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions