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

Fix broken validation and multiple custom #12

Conversation

davidstevens37
Copy link
Contributor

created the ability pass an array of custom validations if needed.

Upgraded ember-cli, ember, and ember data so that the model validator will work on the newest release.

@@ -37,7 +37,8 @@ export default Ember.Mixin.create({
if(Object.keys(errors).length !== 0){
var stateToTransition = this.get('isNew') ? 'created.uncommitted' : 'updated.uncommitted';
this.transitionTo(stateToTransition);
store.recordWasInvalid(this, errors);
var recordModel = this.adapterDidInvalidate ? this : this._internalModel;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This fixes the errors with 1.13.x and allows for current uses to still work. @esbanarango

@esbanarango esbanarango self-assigned this Jul 15, 2015
@esbanarango
Copy link
Owner

@davidstevens37 Thank you very much for your work!! I review and merge this weekend.

@davidstevens37
Copy link
Contributor Author

@esbanarango no problem, let me know if there is anything you think should be changed.

@davidstevens37
Copy link
Contributor Author

@esbanarango is there anything in here you think should changed or is wrong?

esbanarango added a commit that referenced this pull request Jul 29, 2015
…multiple-custom

Fix broken validation and multiple custom
@esbanarango esbanarango merged commit 6e7faac into esbanarango:master Jul 29, 2015
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.

2 participants