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

[BUGFIX] Async relational validations resolve with fake positive #494

Merged
merged 8 commits into from
Apr 24, 2017

Conversation

offirgolan
Copy link
Collaborator

There have been constant issues where after validate or validateAttribute, the returned validations are still validating. This was due to how relational validations were handled.

Changes proposed:

Unfortunately, the only way to combat this issue with the current architecture is to recursively call validate until the validations are truly done validating. In the case of a hasMany or belongsTo, validate should only be called twice.

  1. Resolve the model(s) and grab its validations
  2. Resolve all it's validations promises

Without relational validations, validate will only called once.

Tasks:

  • Added test case(s)
  • Updated documentation

@offirgolan offirgolan merged commit 90fdbf9 into master Apr 24, 2017
@offirgolan offirgolan deleted the bug-fixes branch April 24, 2017 19:27
omarhamdan pushed a commit to omarhamdan/ember-cp-validations that referenced this pull request Jul 27, 2017
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.

1 participant